开发者

php api digest authentication multipart form data

what is the best way for a php rest api server to receive images from a client (here iphone).

Currently, we are sending the base 64 encoded content of the image fi开发者_运维技巧le to the api server from iphone as a POST variable. At server end, we decode this variable and then we are creating a new file based on the decoded content. this works fine.

What are the other ways we can receive images?


For ease of receiving it in PHP, post it as a binary with multipart/form-data and access it via the $_FILES array. You could also do it as an HTTP PUT.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜