Remove owned file
This commit is contained in:
@@ -205,7 +205,7 @@ define([
|
||||
};
|
||||
|
||||
common.uploadComplete = function (id, owned, cb) {
|
||||
postMessage("UPLOAD_COMPLETE", {id: id, owned, owned}, function (obj) {
|
||||
postMessage("UPLOAD_COMPLETE", {id: id, owned: owned}, function (obj) {
|
||||
if (obj && obj.error) { return void cb(obj.error); }
|
||||
cb(null, obj);
|
||||
});
|
||||
|
||||
@@ -151,7 +151,7 @@ define([
|
||||
};
|
||||
|
||||
exp.removeOwnedChannel = function (channel, cb) {
|
||||
if (typeof(channel) !== 'string' || channel.length !== 32) {
|
||||
if (typeof(channel) !== 'string' || [32,48].indexOf(channel.length) === -1) {
|
||||
// can't use this on files because files can't be owned...
|
||||
return void cb('INVALID_ARGUMENTS');
|
||||
}
|
||||
|
||||
@@ -96,21 +96,26 @@ define([
|
||||
}
|
||||
return void console.error(e);
|
||||
}
|
||||
|
||||
// Add pad attributes when the file is saved in the drive
|
||||
Title.onTitleChange(function () {
|
||||
var owners = metadata.owners;
|
||||
if (owners) {
|
||||
common.setPadAttribute('owners', owners);
|
||||
}
|
||||
common.setPadAttribute('fileType', metadata.type);
|
||||
});
|
||||
|
||||
// Save to the drive or update the acces time
|
||||
var title = document.title = metadata.name;
|
||||
Title.updateTitle(title || Title.defaultTitle);
|
||||
|
||||
toolbar.addElement(['pageTitle'], {pageTitle: title});
|
||||
toolbar.$rightside.append(common.createButton('forget', true));
|
||||
if (common.isLoggedIn()) {
|
||||
toolbar.$rightside.append(common.createButton('hashtag', true));
|
||||
}
|
||||
|
||||
var owners = metadata.owners;
|
||||
if (owners) {
|
||||
common.setPadAttribute('owners', owners);
|
||||
}
|
||||
|
||||
common.setPadAttribute('fileType', metadata.type);
|
||||
|
||||
var displayFile = function (ev, sizeMb, CB) {
|
||||
var called_back;
|
||||
var cb = function (e) {
|
||||
|
||||
Reference in New Issue
Block a user