开发者

Should a HTTP POST'ed file be base64 encoded?

I'm currently implementing a client application that POST's a file over HTTP and have implemented base64 encoding on the file's data parameter.

However, it appears th开发者_运维问答at when inspecting the traffic between a simple HTML page with a file upload form and the server that no Content-Transfer-Encoding header is sent in the body when describing the file's parameter.

Is this the preferred way of POST'ing a file over HTTP?


No, the preferred way is using multipart/form-data encoding, exactly as you would use with HTML form based file uploads.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜