top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to upload a file using HTTP POST with web form?

+2 votes
377 views
How to upload a file using HTTP POST with web form?
posted May 21, 2014 by Mishthy Mukherjee

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

File upload boxes is where we're currently at if you don't want to involve other technologies like Flash, Java or ActiveX.

With plain HTML you are pretty much limited to the experience you've described (no progress bar, double submits, etc). If you are willing to use some javascript, you can solve some of the problems by giving feedback that the upload is in progress and even showing the upload progress (it is a hack because you shouldn't have to do a full round-trip to the server and back, but at least it works).

If you are willing to use Flash (which is available pretty much anywhere and on many platforms), you can overcome pretty much all of these problems. A quick googling turned up two such components, both of them free and open source. I never used any of them, but they look good. BTW, Flash isn't without its problems either, for example when using the multi-file uploader for slide share, the browser kept constantly crashing on me :-(

Probably the best solution currently is to detect dynamically if the user has Flash, and if it's the case, give her the flash version of the uploader, while still making it possible to choose the basic HTML one.

answer May 22, 2014 by Anamika
Similar Questions
+1 vote

I'm trying to find open source code which is a form with upload script allowing a user to fill in some fields of data, then pick a couple of documents to upload and finally submit the form.

The status bar will show progress insuring the user doesn't click out and close the browser etc allowing the documents to upload. Once completed it then emails the form results and the attachments to the predetermined email address.

...