Modified implementation of image support without change to filename

This commit is contained in:
Ludovic Dubost
2020-01-04 10:06:41 +01:00
parent 1065ef5d4c
commit 453082c080
6 changed files with 84 additions and 79 deletions

View File

@@ -204703,14 +204703,14 @@ function DecodeBase64(imData, szSrc)
console.log(oImage);
// CRYPTPAD: if we find an image URL with #channel= in it
// then we need to ask cryptpad to get the blob
if (oImage.src.indexOf("#src=")!=-1) {
window.parent.APP.getImageURL(oImage.src, function(url) {
oThis.loadImageByUrl(oImage.Image, url);
oThis.map_image_index[url] = oImage;
});
} else {
oThis.loadImageByUrl(oImage.Image, oImage.src);
}
window.parent.APP.getImageURL(oImage.src, function(url) {
if (url=="") {
oThis.loadImageByUrl(oImage.Image, oImage.src);
} else {
oThis.loadImageByUrl(oImage.Image, url);
oThis.map_image_index[url] = oImage;
}
});
};
this.LoadImagesWithCallback = function(arr, loadImageCallBack, loadImageCallBackArgs)
@@ -205468,16 +205468,6 @@ CCollaborativeEditingBase.prototype.Clear_NewImages = function()
CCollaborativeEditingBase.prototype.Add_NewImage = function(Url)
{
this.m_aNewImages.push( Url );
// CryptPad - Modify URL for local loading
/*
console.log("Add Image " + Url);
if (Url.indexOf("#src=")!=-1) {
window.parent.APP.getImageURL(Url, function(url) {
console.log("CryptPad Image " + url);
});
}
*/ 
// CryptPad - End modification
};
//-----------------------------------------------------------------------------------
// Функции для работы с массивом m_aDC