mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
chore(storage) add " "
This commit is contained in:
parent
e6455767ca
commit
02953e520d
3 changed files with 13 additions and 16 deletions
|
|
@ -15,7 +15,6 @@ var CloudCmd, Util, DOM, CloudFunc, Dropbox, cb, Client;
|
|||
getUserData,
|
||||
Util.exec.ret(callback)
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
cb = function (err, data) { console.log(err || data);};
|
||||
|
|
@ -49,7 +48,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dropbox, cb, Client;
|
|||
}
|
||||
/**
|
||||
* function logins on dropbox
|
||||
*
|
||||
*
|
||||
* @param pData = {key, secret}
|
||||
*/
|
||||
this.login = function(callback) {
|
||||
|
|
@ -169,7 +168,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dropbox, cb, Client;
|
|||
|
||||
if (!file.isFile)
|
||||
size = 'dir';
|
||||
else
|
||||
else
|
||||
size = CloudFunc.getShortSize(file.size);
|
||||
|
||||
json.files.push({
|
||||
|
|
|
|||
|
|
@ -24,15 +24,14 @@ var Util, CloudCmd, DOM, Dropbox;
|
|||
Util.time('dropbox load');
|
||||
|
||||
DOM.Files.get('config', function(error, config) {
|
||||
var element = DOM.load({
|
||||
src : CHOOSER_API,
|
||||
notAppend : true,
|
||||
id : 'dropboxjs',
|
||||
func : DropBoxStore.choose
|
||||
var lDropBoxId = config.dropbox_chooser_key,
|
||||
element = DOM.load({
|
||||
src : CHOOSER_API,
|
||||
notAppend : true,
|
||||
id : 'dropboxjs',
|
||||
func : DropBoxStore.choose
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var lDropBoxId = config.dropbox_chooser_key;
|
||||
element.setAttribute('data-app-key', lDropBoxId);
|
||||
document.body.appendChild(element);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,10 +33,9 @@ var CloudCmd, Util, DOM, gapi;
|
|||
|
||||
setTimeout(function() {
|
||||
gapi.auth.authorize(lParams, function(pAuthResult) {
|
||||
|
||||
if (pAuthResult && !pAuthResult.error)
|
||||
gapi.client.load('drive', 'v2', Util.exec.ret(callback));
|
||||
});
|
||||
});
|
||||
|
||||
}, 1500);
|
||||
});
|
||||
|
|
@ -74,9 +73,9 @@ var CloudCmd, Util, DOM, gapi;
|
|||
'Content-Transfer-Encoding: base64\r\n' +
|
||||
'\r\n' +
|
||||
base64Data +
|
||||
close_delim;
|
||||
close_delim,
|
||||
|
||||
var request = gapi.client.request({
|
||||
request = gapi.client.request({
|
||||
'path': '/upload/drive/v2/files',
|
||||
'method': 'POST',
|
||||
'params': {'uploadType': 'multipart'},
|
||||
|
|
@ -104,4 +103,4 @@ var CloudCmd, Util, DOM, gapi;
|
|||
};
|
||||
|
||||
CloudCmd.GDrive = GDrive;
|
||||
})(CloudCmd, Util, DOM);
|
||||
})(CloudCmd, Util, DOM);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue