简体   繁体   中英

Avoid multipart/form-data for file transfert

I wrote a light http server in C which can handle simple requests. So I totally control the server side and its future evolution.

Now on my Web Application written in Javascript/ExtJS, I need to upload a file on my server. Am I forced to use multipart/form-data to upload a file? Is it bad to directly send the file binary contained in a POST request? I'm afraid that write a parser for multipart/form-data protocol takes me time for nothing...

如果您未将表单类型设置为multipart/form-data ,浏览器将忽略您的文件输入字段,因此我想您必须这样做。

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