Merge pull request #14762 from nextcloud/backport/14674/stable15
[stable15] [app:files] Use current directory for hashing.
This commit is contained in:
commit
a5cbe94878
|
@ -34,12 +34,11 @@
|
||||||
OC.FileUpload = function(uploader, data) {
|
OC.FileUpload = function(uploader, data) {
|
||||||
this.uploader = uploader;
|
this.uploader = uploader;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
var path = '';
|
var basePath = '';
|
||||||
if (this.uploader.fileList) {
|
if (this.uploader.fileList) {
|
||||||
path = OC.joinPaths(this.uploader.fileList.getCurrentDirectory(), this.getFile().name);
|
basePath = this.uploader.fileList.getCurrentDirectory();
|
||||||
} else {
|
|
||||||
path = this.getFile().name;
|
|
||||||
}
|
}
|
||||||
|
var path = OC.joinPaths(basePath, this.getFile().relativePath || '', this.getFile().name);
|
||||||
this.id = 'web-file-upload-' + md5(path) + '-' + (new Date()).getTime();
|
this.id = 'web-file-upload-' + md5(path) + '-' + (new Date()).getTime();
|
||||||
};
|
};
|
||||||
OC.FileUpload.CONFLICT_MODE_DETECT = 0;
|
OC.FileUpload.CONFLICT_MODE_DETECT = 0;
|
||||||
|
|
Loading…
Reference in New Issue