Refactoring insert image from storage using fileChoiceUrl

This commit is contained in:
Julia Radzhabova 2021-10-04 19:29:27 +03:00
parent 37bda824ae
commit 2ff7b2bd99
3 changed files with 6 additions and 0 deletions

View file

@ -1611,6 +1611,8 @@ define([
fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly")
})).on('selectfile', function(obj, file){
file && (file.c = type);
!file.images && (file.images = [{fileType: file.fileType, url: file.url}]); // SelectFileDlg uses old format for inserting image
file.url = null;
me.insertImage(file);
}).show();
}

View file

@ -1628,6 +1628,8 @@ define([
fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly")
})).on('selectfile', function(obj, file){
file && (file.c = type);
!file.images && (file.images = [{fileType: file.fileType, url: file.url}]); // SelectFileDlg uses old format for inserting image
file.url = null;
me.insertImage(file);
}).show();
}

View file

@ -894,6 +894,8 @@ define([
fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly")
})).on('selectfile', function(obj, file){
file && (file.c = type);
!file.images && (file.images = [{fileType: file.fileType, url: file.url}]); // SelectFileDlg uses old format for inserting image
file.url = null;
me.insertImage(file);
}).show();
}