mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
fix(dom) add max length for storage file
This commit is contained in:
parent
a1e013f848
commit
bfcd1cb2c7
1 changed files with 4 additions and 2 deletions
|
|
@ -1488,12 +1488,14 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
this.getCurrentData = function(pCallBack, pCurrentFile) {
|
||||
var lParams,
|
||||
lHash,
|
||||
ONE_MEGABYTE = 1024 * 1024 * 1024,
|
||||
lCurrentFile = pCurrentFile ? pCurrentFile : Cmd.getCurrentFile(),
|
||||
lPath = DOM.getCurrentPath(lCurrentFile),
|
||||
isDir = DOM.isCurrentIsDir(lCurrentFile),
|
||||
|
||||
lFunc = function(pData) {
|
||||
var lExt = '.json',
|
||||
var length = pData.length,
|
||||
lExt = '.json',
|
||||
lName = DOM.getCurrentName(lCurrentFile);
|
||||
|
||||
if (Util.isObject(pData)) {
|
||||
|
|
@ -1503,7 +1505,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
lName += lExt;
|
||||
}
|
||||
|
||||
if (lHash)
|
||||
if (lHash && length < ONE_MEGABYTE)
|
||||
DOM.saveDataToStorage(lPath, pData, lHash);
|
||||
|
||||
Util.exec(pCallBack, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue