Clean images in onlyoffice

This commit is contained in:
yflory 2020-01-22 15:47:12 +01:00
parent ad94e97444
commit 6fd079bfb0

View File

@ -678,7 +678,7 @@ define([
var m = metadataMgr.getChannelMembers().slice().filter(function (nId) {
return nId.length === 32;
});
if (m.length === 1 && !APP.loadingImage) {
if (m.length === 1 && APP.loadingImage <= 0) {
try {
var docs = window.frames[0].AscCommon.g_oDocumentUrls.urls || {};
var mediasSources = getMediasSources();
@ -867,6 +867,7 @@ define([
return void callback("");
}
try {
var blobUrl = URL.createObjectURL(res.content);
// store media blobUrl and content for cache and export
var mediaData = { blobUrl : blobUrl, content : "" };
@ -880,6 +881,7 @@ define([
debug("Adding CryptPad Image " + data.name + ": " + blobUrl);
window.frames[0].AscCommon.g_oDocumentUrls.addImageUrl(data.name, blobUrl);
callback(blobUrl);
} catch (e) {}
});
} catch (e) {
APP.loadingImage--;