I need to upload large files to a web server wit the GWT.
All across the internet, I found dozens of examples that pretend like the main problem lies with coding the server, while I have the biggest problem with the client.
I am not using RPC, but simply the request builder on the client and a PHP backend on the server (no servlets).
The way I understand it, there is no need to implement any of the onSubmit() or onSubmitSucceeded() methods (sorry, don't know their proper names now) of the Form widget. Unless you want to control input fields or throw messages etc.
I wonder what will happen if that file is bigger than the prescribed HTTP packet size? Will the rest of the file simply be cut off?
But the big question is, how do I upload files larger than 10MB over HTTP using the GWT? I don't want to set up an FTP server (no extra ports by my employer).
And yet, you can do this in Youtube. How? Does Youtube use FTP? Seems unlikely, since the client might have decided to firewall FTP traffic (which Youtube should be prepared for).
Or does Youtube use ActiveX?
Is your question about uploading large files using the file upload widget or about how the underlying technology works. I reread a few times and am still a bit confused.
Well, primarily, it is about uploading large files using the GWT. Since the file upload widget seems to be the easiest potential way of doing this, it is also about using the file upload widget for this purpose.
Moreover, since, in theory, the whole thing seems to be impossible, some questions arouse how this technology actually works for places like youtube. I cannot explain how youtube even accomplishes its large file uploads, given the limited HTML package size and no way of reading and writing the file system with Java Script.
You refer to something called "HTTP packet size" or "HTTP package size". Can you explain what you think this term (or these terms, if they are different) mean?
Joined: Jul 19, 2011
Paul Clapham wrote:You refer to something called "HTTP packet size" or "HTTP package size". Can you explain what you think this term (or these terms, if they are different) mean?
Well, there usually is a limit of how big each HTTP packet is allowed to be. If there is no such official limitation in the according RFC, there surely is one in PHP (on server side). You can configure it to be 10MB at the maximum from what I've read. This means that any file larger than that has to be split up into smaller parts so they can be placed into multiple HTTP packets.
Okay. But that's an internal detail of the computer's HTTP stack and users shouldn't need to concern themselves with it. Or have you found in practice that your file uploads are being truncated at a size which you believe is this number, or found some documentation which suggests you have to fiddle with this number to be allowed to upload large files?
Joined: Jul 19, 2011
Paul Clapham wrote:Okay. But that's an internal detail of the computer's HTTP stack and users shouldn't need to concern themselves with it. Or have you found in practice that your file uploads are being truncated at a size which you believe is this number, or found some documentation which suggests you have to fiddle with this number to be allowed to upload large files?
Hmm...looking at the PHP and the HTTP documentations, it seems there is really no limit on this. Maybe what I had read before referred to old versions of PHP, but neither the php.ini's UPLOAD_MAX_FILESIZE nor the HTTP (content-length header field have an explicitly stated limit to be used.
So in theory, this should work (provided you have enough memory on server to manage simultaneously several uploads of videos sized several hundreds of megabytes each).
I'll see how this works out in practice, and at worst, implement some kind of waiting queue if the memory is too busy.
Yes, servers can be written to limit the size of file uploads (otherwise you could have a denial-of-service attack by somebody uploading a file which was ridiculously enormous). But that's not a limit which comes from HTTP, it's a limit which the servers themselves can choose to enforce. So yeah, give it a try and see how it goes.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com