# I am trying to upload a file. i am gretting a "cannot access private property of Zend/Diactoros/UploadedFile" error

**URL:** <https://discourse.cakephp.org/t/i-am-trying-to-upload-a-file-i-am-gretting-a-cannot-access-private-property-of-zend-diactoros-uploadedfile-error/7054>\
**Category:** Uncategorized\
**Created:** [January 3, 2020, 2:32pm UTC](https://discourse.cakephp.org/t/i-am-trying-to-upload-a-file-i-am-gretting-a-cannot-access-private-property-of-zend-diactoros-uploadedfile-error/7054 "2020-01-03T14:32:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adedeji15](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@adedeji15](https://discourse.cakephp.org/u/adedeji15)\
**Post date:** [January 3, 2020, 2:32pm UTC](https://discourse.cakephp.org/t/i-am-trying-to-upload-a-file-i-am-gretting-a-cannot-access-private-property-of-zend-diactoros-uploadedfile-error/7054/1 "2020-01-03T14:32:55Z")

</div>

This used to work in 3.x version but in this strange v4.0 . Its not working

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [January 3, 2020, 5:59pm UTC](https://discourse.cakephp.org/t/i-am-trying-to-upload-a-file-i-am-gretting-a-cannot-access-private-property-of-zend-diactoros-uploadedfile-error/7054/2 "2020-01-03T17:59:21Z")

</div>

What property is it that you’re trying to access? There’s probably some function in that class that you can use to access it, instead of direct manipulation.

---

<div class="post-metadata">

**Author:** ![adedeji15](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@adedeji15](https://discourse.cakephp.org/u/adedeji15)\
**Post date:** [January 4, 2020, 8:07pm UTC](https://discourse.cakephp.org/t/i-am-trying-to-upload-a-file-i-am-gretting-a-cannot-access-private-property-of-zend-diactoros-uploadedfile-error/7054/3 "2020-01-04T20:07:58Z")

</div>

I already defeated it. Thanks

---

<div class="post-metadata">

**Author:** ![Tobse](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/tobse/32/236_2.png) [@Tobse](https://discourse.cakephp.org/u/Tobse)\
**Post date:** [January 16, 2020, 8:45am UTC](https://discourse.cakephp.org/t/i-am-trying-to-upload-a-file-i-am-gretting-a-cannot-access-private-property-of-zend-diactoros-uploadedfile-error/7054/4 "2020-01-16T08:45:20Z")

</div>

And how? I’m having the same problem. 🙂
