Skip to content

Instantly share code, notes, and snippets.

@basketofsoftkittens
Created October 3, 2012 22:27
Show Gist options
  • Save basketofsoftkittens/3830289 to your computer and use it in GitHub Desktop.
Save basketofsoftkittens/3830289 to your computer and use it in GitHub Desktop.
/*for this line in this file
https://github.com/sigurdga/django-jquery-file-upload/blob/master/fileupload/static/js/jquery.fileupload.js#L421
replace that ONE line with
*/
$.each(input.prop('files'),function(file){
if (file) {
var type = file.type.toLowerCase();
if (type) {
if (type.indexOf('image') > -1) {
paramName.push(options.imageParameterName);
}
}
}
});
/*
when creating the widget, make sure you pass this property into the object. this property will be the parameter name of the image files
{
imageParameterName:"images[]"
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment