mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(filepicker) uploadFile
This commit is contained in:
parent
7f59d8055e
commit
181f86405c
1 changed files with 9 additions and 8 deletions
|
|
@ -15,18 +15,19 @@ var CloudCmd, Util, DOM, filepicker;
|
|||
}
|
||||
|
||||
|
||||
this.uploadFile = function(pParams, pCallBack) {
|
||||
var lContent = pParams.data,
|
||||
lName = pParams.name;
|
||||
this.uploadFile = function(params) {
|
||||
var content = params.data,
|
||||
name = params.name,
|
||||
log = Util.log.bind(Util);
|
||||
|
||||
filepicker.store(lContent, {
|
||||
filepicker.store(content, {
|
||||
mimetype: '',
|
||||
filename: lName
|
||||
filename: name
|
||||
},
|
||||
function(pFPFile) {
|
||||
Util.log(pFPFile);
|
||||
function(fpFile) {
|
||||
log(fpFile);
|
||||
|
||||
filepicker.exportFile(pFPFile, Util.log, Util.log);
|
||||
filepicker.exportFile(fpFile, log, log);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue