blueimp/jQuery-File-Upload — Issue #721: Disable add button on initialisation
Author: tbathurst
Created: 2011-10-20 10:43:04+00:00
State: open

Hi,

I have a questionnaire form that I am developing that utilises multiple instances of the file uploader all working on one form. Upon upload I arrange my files into their own folders at the server. This all works perfectly

When I return to the Questionnaire to edit - I pull my information on each file uploaded and populate as per the instruction here:

https://github.com/blueimp/jQuery-File-Upload/wiki/How-to-populate-the-file-list-on-page-load-or-between-page-refresh

I am limiting each instance of the file uploader to 1 upload each - and as such when a file is uploaded the "Add" button is disabled. Perfect.

My question is - is if the individual instance of the uploader already has a file attached on initialisation - how do I disable the Add button? I can fathom how to diable the whole Widget - but not just the add button (in the same way this is disabled when you have reached the limit (i.e. 1 file) that has been set.

I'd also like to then be able to re-enable the add button if the file is then deleted.

Any advice on either of those issues, greatly appreciated.

Cheers
Tom