issue in uploading large files to aws s3 through browser using aws-sdk

柔情痞子 提交于 2019-12-13 06:17:00

问题


With the help of this blog http://www.cheynewallace.com/uploading-to-s3-with-angularjs/ I did manage to upload the files of smaller size (<30MB) to the s3 bucket. But while uploading a bit larger file (above 30MB) I am facing some issue.

error:Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at 'https://s3.amazonaws.com/**' (Reason: CORS request failed).

I am getting this error in the middle of file uploading i.e,initially it starts uploading ,but later (say after 15% or 18% uploaded) it is firing the CORS error and the uploading of file again starts from 0%

I am very new to AWS S3. Please correct me if I am asking anything wrong.


回答1:


This issue is common issue while uploading large files on amazon s3. Recommended way for upload large files to amazon is divide your large files into small chunks. For uploading files, you can use this angular library. and for divide your files into chunks, you can follow this sample example.. I hope, this will help you.



来源:https://stackoverflow.com/questions/33009586/issue-in-uploading-large-files-to-aws-s3-through-browser-using-aws-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!