Fix uloaded files not moved to the correct folder in drive

This commit is contained in:
yflory
2017-10-12 17:33:22 +02:00
parent 88d0a2b8a6
commit b86f8e3f26
3 changed files with 12 additions and 21 deletions

View File

@@ -28,6 +28,9 @@ define([
var u8 = file.blob; // This is not a blob but a uint8array
var metadata = file.metadata;
// if it exists, dropEvent contains the new pad location in the drive
var dropEvent = file.dropEvent;
var key = Nacl.randomBytes(32);
var next = FileCrypto.encrypt(u8, metadata, key);
@@ -73,6 +76,7 @@ define([
if (noStore) { return void onComplete(href); }
common.initialPath = dropEvent && dropEvent.path;
common.renamePad(title || "", href, function (err) {
if (err) { return void console.error(err); }
onComplete(href);