From 39e99afbc1ab58c218684aafb28ce4d80c9d37eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Genicio?= Date: Thu, 8 Sep 2016 10:56:56 +0200 Subject: [PATCH] support to modify filename before sending file to server --- js/jquery.fileupload.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/jquery.fileupload.js b/js/jquery.fileupload.js index f20bc6d06..40e3c4be1 100644 --- a/js/jquery.fileupload.js +++ b/js/jquery.fileupload.js @@ -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'; @@ -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 @@ -500,7 +500,7 @@ ($.type(options.paramName) === 'array' && options.paramName[index]) || paramName, file, - file.uploadName || file.name + file.uploadName || file.Aname ); } });