diff options
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r-- | apps/files/js/file-upload.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 8bcaa2e24aa..25136d042a9 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -130,6 +130,16 @@ OC.FileUpload.prototype = { }, /** + * Get full path for the target file, + * including relative path and file name. + * + * @return {String} full path + */ + getFullFilePath: function() { + return OC.joinPaths(this.getFullPath(), this.getFile().name); + }, + + /** * Returns conflict resolution mode. * * @return {int} conflict mode @@ -151,7 +161,7 @@ OC.FileUpload.prototype = { /** * Returns whether the upload is in progress * - * @return {bool} + * @return {boolean} */ isPending: function() { return this.data.state() === 'pending'; @@ -508,9 +518,10 @@ OC.Uploader.prototype = _.extend({ return; } // retrieve more info about this file - this.filesClient.getFileInfo(fileUpload.getFullPath()).then(function(status, fileInfo) { + this.filesClient.getFileInfo(fileUpload.getFullFilePath()).then(function(status, fileInfo) { var original = fileInfo; var replacement = file; + original.directory = original.path; OC.dialogs.fileexists(fileUpload, original, replacement, self); }); }, |