0

I am using plupload version 2.0. For Drag and Drop I have given the element id let say container1. On some Javascript event I want to change the dragAndDrop container holding the plugin object. I tried changing the property dynamically using uploader.setting.drop_element=$('#container2'), but didn't get the expected result. Searched on the web but not able to find a working solution.Is there any alternative way to solve the problem? Please help me out.

Thanks in advance

Ankur Aggarwal
  • 2,993
  • 5
  • 30
  • 56

2 Answers2

1

This should work:

var uploader = new plupload.Uploader({
    drop_element : $('container2')
})
Ferry Kranenburg
  • 2,625
  • 1
  • 17
  • 23
  • 1
    Its like creating a new uploader instance. I want to override the previous one only – Ankur Aggarwal Nov 19 '14 at 08:51
  • Invoking browse dialog programmatically - see https://stackoverflow.com/questions/5182019/manually-trigger-open-file-dialog-using-plupload – lubosdz Sep 20 '19 at 09:10
0

this(uploader instance).settings.drop_element = "new dom element" dynamically will change the drop_element

Prannoy Mittal
  • 1,525
  • 5
  • 21
  • 32