PDA

View Full Version : help with explanation of code in blueimp jquery main.js



kc11
08-16-2012, 02:53 PM
Hi everyone,

I am trying to use the blueimp jquery upload widget. I have modified it so that authenticated users each have a folder which contain their own uploaded images. This is working fine on the server side but the images are not being displayed to the authenticated users.

I found an issue which appears to be the same as mine at https://github.com/blueimp/jQuery-File-Upload/issues/241.

In this the plugin author says:



Have a look at example/application.js, the second section is commented with
// Load existing files:
There, add
+ '?ext=VAR1&nota=VAR2'
behind
$('#file_upload').fileUploadUIX('option', 'url')
and adjust VAR1 and VAR2 to your desired path variables.


here is the code from the main.js file:



$('#fileupload').each(function () {
var that = this;
$.getJSON(this.action, function (result) {
if (result && result.length) {
$(that).fileupload('option', 'done')
.call(that, null, {result: result});
}
});
});


Can someone explain what I need to do here?

Thanks,

Bill

FrickenTrevor
08-31-2012, 11:03 PM
Something like this perhaps?



$('#file_upload').fileUploadUIX('option', 'url') {
+ '?ext=VAR1&nota=VAR2'

//rest of code

}