0

Is it possible that I could invoke plupload file upload dialog programmatically using any runtime?

Actually, I have a table with 9 cells. I want that when user clicks on a cell it calls upon a file upload dialog and upload an image in the same dialog.

Is it possible through Plupload?

Cœur
  • 37,241
  • 25
  • 195
  • 267
user1404963
  • 415
  • 3
  • 6
  • 17

1 Answers1

0

You can invoke plupload programmatically client side, and even have several uploaders on your page.

A way to do it :

  • having 9 invisible div containers with ids pludiv1, ... , pludiv9. They will contain your uploaders
  • embed all your plupload initialization code in a pluploadInit function that takes an id as a parameter. In the function, you will use this id to retrieve the div and init the uploader inside it.
  • upon click on buttonX, show pludivX first(important), and invoke pluploadInit with "pludivX" as a parameter.

As you will have several uploaders, pay attention to their contexts. For example, you will have to add some extra parameter to identify the button-uploader in your post request to the server.

jbl
  • 15,179
  • 3
  • 34
  • 101