0

I know how to do the traditional "Select File..." and then "Upload" mechanism for uploading files. I would like to know if there is a way to do this using single input control. Part of the motivation for this is that nobody selects a file without wanting to upload it, so why should people have to two-step the process?

I know that there are some Flash solutions; I'm not opposed to using Flash but would like to know if this problem can be solved without it. I am thinking that it would operate very similarly to the way Gmail uploads its own attachments.

The application for this is a photo uploader; the user would click on the control, a file selection dialog would pop up, the user would select the file, and then the upload process would initiate, placing the photo somewhere on the page.

There have been several questions posted similar to this, here on stackoverflow and elsewhere on the web. Many times the answer has been: "NO! IT'S A SECURITY ISSUE!" but with no explanation of why this is a security issue. If this is a security issue, why is it a security issue?

1 Answer 1

0

this is possible to simulate an "Ajax" upload like specified here. Associated with a "onchange" event on the input, that will start the upload. And to style the input type="file" like explained here so that it looks like a single button.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.