Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

support to modify filename before sending file to server #3497

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions js/jquery.fileupload.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@
}
if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
options.headers['Content-Disposition'] = 'attachment; filename="' +
encodeURI(file.name) + '"';
encodeURI(file.Aname) + '"';
}
if (!multipart) {
options.contentType = file.type || 'application/octet-stream';
Expand Down Expand Up @@ -489,7 +489,7 @@
});
}
if (options.blob) {
formData.append(paramName, options.blob, file.name);
formData.append(paramName, options.blob, file.Aname);
} else {
$.each(options.files, function (index, file) {
// This check allows the tests to run with
Expand All @@ -500,7 +500,7 @@
($.type(options.paramName) === 'array' &&
options.paramName[index]) || paramName,
file,
file.uploadName || file.name
file.uploadName || file.Aname
);
}
});
Expand Down