Merge pull request #1224 from ONLYOFFICE/fix/insert-image

Refactoring insert image from storage using fileChoiceUrl
This commit is contained in:
Julia Radzhabova 2021-10-05 12:51:22 +03:00 committed by GitHub
commit acd44354ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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

@ -1612,6 +1612,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();
}