Skip to content

Commit c545ea5

Browse files
committed
Make use of file.uploadName for blob and non-multipart uploads.
Extends 0decc74. Closes blueimp#3497.
1 parent 25c536f commit c545ea5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/jquery.fileupload.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@
453453
}
454454
if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
455455
options.headers['Content-Disposition'] = 'attachment; filename="' +
456-
encodeURI(file.name) + '"';
456+
encodeURI(file.uploadName || file.name) + '"';
457457
}
458458
if (!multipart) {
459459
options.contentType = file.type || 'application/octet-stream';
@@ -489,7 +489,11 @@
489489
});
490490
}
491491
if (options.blob) {
492-
formData.append(paramName, options.blob, file.name);
492+
formData.append(
493+
paramName,
494+
options.blob,
495+
file.uploadName || file.name
496+
);
493497
} else {
494498
$.each(options.files, function (index, file) {
495499
// This check allows the tests to run with

0 commit comments

Comments
 (0)