Jump to content

FTP upload with PHP


Inspector Mills

Recommended Posts

Hi there

 

We are hosting a web server that requires large files (100MB+) to be uploaded to it.  We are using PHP upload scripts, and it is working, but we are getting complaints that the uploads are unreliable (some files fail to upload, with no error messages).

 

I have been reading on various forums that FTP should rather be used for larger files, rather than HTTP.  But from what I can see, there are some limitations, and I was wondering if there are any ways around these:

- Using cURL would mean that the files would first be uploaded to a temp folder on the web server via HTTP, and then only sent via FTP.  This defeats the purpose, because if it is already on the Web Server (which is hosted locally), then I might just as well move the file.

- Using the built in FTP functionality of PHP, it appears that ones needs to know the full path of the source file.  The users who are uploading files are accessing the Web server via a form in a browser, which will not give the PHP script the full path of the file to be uploaded.

 

All we want is to have a reliable means for an end-user to access a site with a browser, fill in a form, choose a file to upload, and submit it.  Additional functionality, like a progress bar, the ability to select multiple files and a resume option for failed uploads, would all be very nice.  But the main concern is that the transfers be more reliable.

 

Thanks for any advice.

 

Mills

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.