Hello,
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).
I know you can use the FileUpload widget. I also know the HTML-Stuff (how you need a form element, too, and how the GWT compiler will create an "input-type:file" element). Since JavaScript does not allow you to access your file system (read/write) directly, I assume that the submit() method of the Form automatically instructs the browser to read the file from disk and create the approriate HTTP header and body to send to the server. I know that will incorporate the file into the body with the proper encoding.
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).
Also, since you cannot use JavaScript to split the video into pieces on client side (in the background, without the user noticing), I cannot think of a way of doing this.
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?
Please, I really need to know how to do this.
Thanks in advance.