On Wed, Apr 15, 2009 at 12:39 PM, Vitali Lovich <[email protected]> wrote:

> http://igstan.blogspot.com/2009/01/pure-javascript-file-upload.html
>
> From the comments you cannot read more than 100MB (although I doubt this is
> an actual restriction) & you have to read the whole file (meaning large
> files will pause your program for quite a while).

Sorry - meant to make it clear, particularly since this is FF specific (if
Chrome had this API, it would only apply to the tab), this will hang your
browser until the entire file is read into memory.  Only background threads
would solve this issue, but that would further lower your user base to FF
3.5 & Google Gears users (assuming you created an API wrapper that supported
both).

>
>
> More importantly, this is FF3 only, which leaves out users of any other
> browser which is even worse than the flash option.
>
>
> On Wed, Apr 15, 2009 at 7:12 AM, evgeniy <[email protected]> wrote:
>
>>
>> Yes, you can do it only in FireFox 3, as far as I know.
>> If you have FileUpload element then you can acces to file's data from
>> native JavaScript.
>> For example you have FileUpload and set its ID to "file" then
>> following method returns binary data contained in file:
>>    private native String getFileBinary() /*-{
>>        return $doc.getElementById("file").files[0].getAsBinary();
>>    }-*/;
>> Then you are free to use returned data in RPC call or whatever you
>> want.
>>
>> You can read more here: https://developer.mozilla.org/En/NsIDOMFile
>>
>> On Apr 14, 11:18 am, loudo <[email protected]> wrote:
>> > Hello
>> >
>> > Can i make a file upload with a rpc call ?
>> > I want to upload a file with the rpc call but i have not found
>> > example.
>> > I have only found example with submit form.
>> >
>> > Thanks a lot for your response.
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to