简体   繁体   中英

Yii2 put request FormData parse body

I'm using yii2 for my back end stack and I'm developing a Rest Project. I have an action which response to http PUT request and the request content-type is form-data and the reason is obvious cause it contains file .

but I can't get request body parsed. I know this is php bug and it's not related to yii2.

https://bugs.php.net/bug.php?id=55815

and also I've read the following page

https://github.com/yiisoft/yii2/pull/12466

but it seems that this patch is on master branch only and its not stable yet.

-- host: ubuntu 14.04
-- webserver : php internal web server
-- php : PHP 5.5.9

any idea?

You are right, the patch is not released yet. Modify the composer.json in your project and require "yiisoft/yii2": "*@dev" to get unstable version right now. Otherwise just wait for a week or two and we will bump 2.0.10 release with this update

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM