最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What is the difference between a multipart file upload and a chunked file upload ? Which approach is more efficient

programmeradmin1浏览0评论

I am currently trying to upload files to Alfresco CMS and i have two approaches

  1. Use submit the file as multipart POST request
  2. Upload the file as chunks from the client and then reassemble the chunks on the Alfresco side using Web Scripts.

Which approach is better and why?

I did some research online on the two approaches

difference between multipart and chunked protoccol

How does HTTP file upload work?

Why is form enctype=multipart/form-data required when uploading a file?

But still unable to conclusively determine the pros and cons.

PS: The size of files being uploaded can range for 5 MB to 2 GB.

I am currently trying to upload files to Alfresco CMS and i have two approaches

  1. Use submit the file as multipart POST request
  2. Upload the file as chunks from the client and then reassemble the chunks on the Alfresco side using Web Scripts.

Which approach is better and why?

I did some research online on the two approaches

difference between multipart and chunked protoccol

How does HTTP file upload work?

Why is form enctype=multipart/form-data required when uploading a file?

But still unable to conclusively determine the pros and cons.

PS: The size of files being uploaded can range for 5 MB to 2 GB.

Share Improve this question edited May 23, 2017 at 12:25 CommunityBot 11 silver badge asked Dec 29, 2015 at 11:47 Praveen KumarPraveen Kumar 1,5391 gold badge23 silver badges39 bronze badges 1
  • Note that "chunks" in Alfresco CMS does not refer to HTTP chunked transfer-encoding. – ZachB Commented Jan 31, 2023 at 22:04
Add a ment  | 

1 Answer 1

Reset to default 3

I think use of second approach

Upload the file as chunks from the client and then reassemble the chunks on the Alfresco side using Web Scripts

will be better, the reason being Form submission is synchronous and will block browser usage until the whole file is uploaded which in your case is pretty big, Using client side script to send your data will enable you show upload progress to end-user and provide you the ability to resume/restart upload in case of any network error during file upload.

You can read this article for more details http://creativejs./tutorials/advanced-uploading-techniques-part-1/

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论