mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 10:27:48 +08:00
Refactoring insert image from storage using fileChoiceUrl
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user