Commit 4b3e1cbd authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

delete g_nMaxJsonLengthChecked, g_nMaxJsonLength

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64887 954022d7-b5bf-4e40-9824-e11837661b57
parent 8a899ae9
...@@ -58,8 +58,6 @@ if (typeof String.prototype.repeat !== 'function') { ...@@ -58,8 +58,6 @@ if (typeof String.prototype.repeat !== 'function') {
var g_oZipChanges = null; var g_oZipChanges = null;
var g_sDownloadServiceLocalUrl = "/downloadas"; var g_sDownloadServiceLocalUrl = "/downloadas";
var g_sUploadServiceLocalUrl = "/upload"; var g_sUploadServiceLocalUrl = "/upload";
var g_nMaxJsonLength = 2097152;
var g_nMaxJsonLengthChecked = g_nMaxJsonLength / 1000;
var g_nMaxRequestLength = 5242880;//5mb <requestLimits maxAllowedContentLength="30000000" /> default 30mb var g_nMaxRequestLength = 5242880;//5mb <requestLimits maxAllowedContentLength="30000000" /> default 30mb
var g_cCharDelimiter = String.fromCharCode(5); var g_cCharDelimiter = String.fromCharCode(5);
...@@ -240,10 +238,9 @@ function g_fGetSaveUrl(urls){ ...@@ -240,10 +238,9 @@ function g_fGetSaveUrl(urls){
} }
return null; return null;
} }
function sendCommand2(editor, fCallback, rdata, dataContainer){ function sendCommand2(editor, fCallback, rdata, dataContainer) {
//json не должен превышать размера g_nMaxJsonLength, иначе при его чтении будет exception //json не должен превышать размера 2097152, иначе при его чтении будет exception
if(null == rdata["savetype"]) if (null == rdata["savetype"]) {
{
editor.CoAuthoringApi.openDocument(rdata); editor.CoAuthoringApi.openDocument(rdata);
return; return;
} }
...@@ -253,14 +250,16 @@ function sendCommand2(editor, fCallback, rdata, dataContainer){ ...@@ -253,14 +250,16 @@ function sendCommand2(editor, fCallback, rdata, dataContainer){
url: g_sDownloadServiceLocalUrl + '/' + rdata["id"] + '?cmd=' + encodeURIComponent(JSON.stringify(rdata)), url: g_sDownloadServiceLocalUrl + '/' + rdata["id"] + '?cmd=' + encodeURIComponent(JSON.stringify(rdata)),
data: dataContainer.part || dataContainer.data, data: dataContainer.part || dataContainer.data,
contentType: "application/octet-stream", contentType: "application/octet-stream",
error: function(){ error: function() {
if(fCallback) if (fCallback) {
fCallback(null, true); fCallback(null, true);
}
}, },
success: function(msg){ success: function(msg) {
if(fCallback) if (fCallback) {
fCallback(JSON.parse(msg), true); fCallback(JSON.parse(msg), true);
} }
}
}); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment