upload a large file over 1GB to 2GB using jQuery F

2019-04-22 07:56发布

I am trying to upload a large file over 1GB to 2GB using jQuery File Upload - blueimp (Ajax based) php / yii Framework 1.15 i have set these values to upload larger file

memory_limit = 2048M
upload_max_filesize = 2048M 
post_max_size = 2048M 

Session time set

ini_set('session.gc_maxlifetime', 7200);

I test lesser than 1GB file that is uploading successfully

when I am trying to upload larger than 1GB file it shows Forbidden error after 50mins uploading time...

Server Specifications

  • it's a virtual machine, and due to it's not production yet so we only using 1CPU and 1GB memory, 64bit

File uploading is working in Google Chromeand Microsoft Edge(I have tested with 1.15 and 1.88 GB file) when I am uploading file in Mozilla Firefox less than 300MB it is uploading successfully but when I am trying yo upload greater than 300MB file after some time Ajax call is fails and give 500 Internal Server Error header response is in below image header response

1条回答
三岁会撩人
2楼-- · 2019-04-22 08:58

When you upload files having size more than 100 MB, better go for chunked file uploads. jQuery-File-Upload supports that.

It splits files into smaller fragments with predefined chunk size and upload them one by one. Another advantage is that you can resume file uploads. No need to upload entire file again, if the upload is interrupted. Also it can overcome your upload_max_filesize and post_max_size issue.

查看更多
登录 后发表回答