Support Forum

File Upload One Click Button

S 0044s
0044s
Member

hello,

 

i installed the plugin, even managed to enable guests to upload files. everything works like a charme. now what i still want  to do is merge the “add file ” and “start upload” buttons. no need for a seperated process. i only need one button: “add file” -when clicked i want the user to choose a file, and the image to be instantly uploaded with the code copied into the textarea.

 

what i tried was triggering the hided “start upload” button with jquery when “add file” is clicked. didn’t work.

and plupload.full.js and jquery.ui.plupload.js are quite hard to rewrite. any help?

 

thanks,

stefan

3 Answers

New Answer

MP Mr Papa
Mr Papa
Member

wow. impressive.

as you probably know, plupload is third party software that we did not write…  and as such, afraid we dont know much about those js files either…

have you looked at the plupload api: http://plupload.com/plupload/docs/api/index.html

I have to wonder if its possible to use some of their events to do what you want…

the problem with jquery and triggering or clicking (did you try the latter – click()?) might be that it doesnt work on hidden elements – unsure…

S 0044s
0044s
Member

thanks for the link, made me find a solution!

find the javascript part in sp-plupload-components.php and simply add

uploader.bind(‘FilesAdded’, function(up, files) {
uploader.start();
});

 

🙂