浏览代码

Web Server: Fix jquery.fileupload.js to handle directory structure

file.relativePath + file.name will handle both Chrome and Firefox
behaviours with filenames whereas file.path will only work with Firefox.

Closes #658
Edgar Fouillet 5 年之前
父节点
当前提交
c0ee5b338a
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Resources/web/jquery.fileupload.js

+ 3 - 1
Resources/web/jquery.fileupload.js

@@ -425,7 +425,9 @@
                                     that._isInstanceOf('Blob', file)) {
                                 formData.append(
                                     options.paramName[index] || paramName,
-                                    file, file.path
+                                    //file.relativePath + file.name will handle both Chrome and Firefox
+                                    //behaviours with filenames whereas file.path will only work with Firefox.
+                                    file, file.relativePath + file.name
                                 );
                             }
                         });