blueimp/jQuery-File-Upload — Issue #800: changing filenames
Author: dougwo
Created: 2011-11-20 03:41:29+00:00
State: open

I have successfully changed filenames on upload for security by setting file->temp to a generated name and then using that as the filename portion on the upload method. But i need to return both the original name (file.name) and the new name (file.temp) to the fileuploaddone binding so that the proper name is displayed in the UI box but I can call an ajax function to save the new filename in a database. It appears as though the data contstruct that is returned only includes the parts name, type and size. Wouldn't it be far more useful if the entire file object was returned? Or is it and I am just missing something?

// process files after upload is complete
$('#fileupload').bind('fileuploaddone', function (e, data) {
$.each(data.files, function (index, file) {

alert(file.name or file.size or file.type only!!!) I'd like the entire file object from the returned $info array

});
});