diff options
-rw-r--r-- | apps/files/js/file-upload.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index a56668c493f..7681de9bf38 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -34,12 +34,11 @@ OC.FileUpload = function(uploader, data) { this.uploader = uploader; this.data = data; - var path = ''; + var basePath = ''; if (this.uploader.fileList) { - path = OC.joinPaths(this.uploader.fileList.getCurrentDirectory(), this.getFile().name); - } else { - path = this.getFile().name; + basePath = this.uploader.fileList.getCurrentDirectory(); } + var path = OC.joinPaths(basePath, this.getFile().relativePath || '', this.getFile().name); this.id = 'web-file-upload-' + md5(path) + '-' + (new Date()).getTime(); }; OC.FileUpload.CONFLICT_MODE_DETECT = 0; |