Jump to content

[SOLVED] One button to upload a file


bigdawggi

Recommended Posts

Hi everyone, I have done some googling on this, but haven't found anything useful.

 

What I'm trying to accomplish is this:

1) User clicks custom button

2) That button pops up a file browser window, from which the user can choose which file to upload

3) When they select the file, it uploads that automatically.

 

I've thought of dynamically appending a form, with an input type="file", but I can't seem to find how to automatically have that 'browse' button activate (and bring up the file system browser automatically that way).  After selection, I know I can bind to the 'onChange' event, and submit the form.

 

The whole idea is to have one button that does all the action for us, and the user never sees the form; they just get a filesystem popup where they can select the file and then it will automatically upload via ajax (so they can preview it).

 

Thoughts/help are greatly appreciated!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.