开发者

HTML5 Multiple files upload using AJAX?

With HTML 5 i am trying to implement the file upload functionality. Now if i am uploading more that one file for which there are following two options.

  • Single Request: Using singe AJAX request i upload all 5 files. Something similar like multipart encoding.

|HTTP1Start-file1-file2-file3-file4-file5-HTTP1End|

|HTTP1Start-file1-HTTP1End|

|HTTP2Start-file2-HTTP2End|

|HTTP3Start-file3-HTTP3End|

|HTTP4Start-file4-HTTP4End|

|HTTP5Start-file5-HTTP5End|

My understating is that option two will be better and will also improve the upload performance.

Please let me know if that is correct or incorrect. Also let me know if there are any catches which should be taken care.


The primary thing you need to be aware of is that not all browsers will support multiple-file upload within a single request. Hence, the latter approach is the only one that will work in all browsers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜