0

How could I upload files with javascript in the same way that Gmail does? I want no components or jQuery plugins, I just want to understand the technique.

I've found lots of articles about how to add input elements dynamically, or create fancy "marquee" progress bars, or dialogs, and also about comercial components or jQuery plugins. I just want to accomplish the same than Gmail does.

Thanks in advance.

1 Answer 1

2

Gmail currently uses (hidden) Flash uploading (see http://ajaxian.com/archives/multi-file-upload-in-the-flickr-and-gmail-house )

So if you want to do it like Gmail, you might want to check out SWFUpload . It uses javascript with a small flash object that's hidden to facilitate the upload. Here's an example of a regular form with an invisible SWFUpload component.

Pure javascript upload is not possible; some server interaction is required.

Sign up to request clarification or add additional context in comments.

3 Comments

Here's a similar question (though the OP mentions he wants to use jQuery) stackoverflow.com/questions/710852/…
arghh... I don't want to use flash. I think I will have to wait for HTML5 :D. Thanks.
@bitbitbit Yeah, it's unfortunate. The best you can do for your users, though, is to make it as easy as possible (even if that means using flash -- just hide it!) :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.