0

I need to write a script to upload big Files (~2GB+) to a server. I don't think HTTP is the right way to do this so I want to use (S)FTP. There are several tutorials about this (using cURL or ftp_connect) and I understand that i have to set several things in the php.ini.

But all this tutorials upload the file to a remote Server, what I want to do is upload it to the Server the script is running on, without having to upload the file to the Server over HTTP first.

Is this possible? If so, how would I do that?

4

1 に答える 1

1

HTTP can be the right way to upload large files. You can use resumable.js or similar library to split the file in "chunks" and then reassemble the file on the server.

If you decided not to go with HTTP and have shell access, I recommend you use rsync (with the --partial flag) which will do the heavy lifting for you.

于 2012-05-22T14:48:32.733 に答える