Upload 1GB files using chunking in PHP

前端 未结 8 1209

I have a web application that accepts file uploads of up to 4 MB. The server side script is PHP and web server is NGINX. Many users have requested to increase this limit dra

相关标签:
8条回答
  • 2020-11-27 05:57

    Take a look at tus protocol which is a HTTP based protocol for resumable file uploads so you can carry on where you left off without re-uploading whole data again in case of any interruptions. This protocol has also been adopted by vimeo from May, 2017.

    You can find various implementations of the protocol in different languages here. In your case, you can use its javascript client called uppy and use golang or php based server implementation in a server.

    0 讨论(0)
  • 2020-11-27 05:57

    you can use this package

    it supports resumable chunk upload.

    in the examples/js-examples/resumable-chunk-upload example , you can close and re-open the browser and then resume not completed uploads.

    0 讨论(0)
  • 2020-11-27 05:59

    You can definitely write a web app that will accept a block of data (even via a POST) then append that block of data to a file. It seems to me that you need some kind of client side app that will take a file and break it up into chunks, then send it to your web service one chunk at a time. However, it seems a lot easier to create an sftp dir, and let clients just sftp up files using some pre-existing client app.

    0 讨论(0)
  • 2020-11-27 06:01

    How about using a java applet for the uploading and PHP for processing..

    You can find an example here for Jupload: http://sourceforge.net/apps/mediawiki/jupload/index.php?title=PHP_Example

    0 讨论(0)
  • 2020-11-27 06:02

    I have created a JavaFX client to send large files in chunks of max post size (I am using 2 MB) and a PHP receiver script to assemble the chunks into original file. I am releasing the code under apache license here : http://code.google.com/p/gigaupload/ Feel free to use/modify/distribute.

    0 讨论(0)
  • 2020-11-27 06:09

    Try using the bigupload script. It is very easy to integrate and can upload up to 2 Gb in chunks. The chunk size is customizable.

    0 讨论(0)
提交回复
热议问题