Forum Moderators: coopster
I have to implement a file upload for a client who's customers should be able to upload very large files (up to 500 MB).
Up to now I always used the regular http upload, but also always experienced some problems with uploading big files (time outs, max_file_size, httpd.conf parameters etc.)
Since I want to make the upload as reliable as possible (and to avoid to make the customers having to start the upload over and over), I am wondering if ftp upload would be a better choice and if it would be more reliable than http.
I appreciate any advice or experience anybody can offer.
Greets Lars
http was designed to be fast, but not solid. Who cares if you lose a few packets here and there anyway?
ftp does a lot more packet verification. That means it's somewhat slower for a given size file, but the file is more likely to get through in one piece because, for a binary application file, for example, one lost packet is as good as losing the whole thing.
[php.net...]
Or a third party web app, like:
[freshmeat.net...]
Also, I do not need a php based ftp-client - the only thing the user is allowed to do is upload nothing else.
The question is if there's a general preference between http and ftp when uploading extremly huge files. ergophobe already hinted in one direction. Now I would like to know if there are any other pitfalls to look out for....
Thanks again
FTP Pitfalls:
- one more protocol
- might be slower on small files (extra roundtrip to open TCP connection; authentication used even for anonymous download)
- might be harder if user is going through a firewall.
FTP Advantages:
- more reliable in terms of data corruption
- might be faster (better packet recovery)
- resumable (I would think that would be a big one if transfers are getting dropped). Apparently some http requests are resumable too, but I don't know about that.
I'd like my web-visitors to upload large files to the server, without the file being trasfered via HTTP first. Is this possible? How?
Advantages:
- the well known progress problem is take care of by windows
- easy to user for your visitor
Greets,
Lars