You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively the Blob object could be used, however blobs itself do not provide a way to define a filename. This is problematic since during upload the filename is read from the file object and send with other data:
and with Blob instance, the filename is always set to "blob":
which doesn't work well with upload integration:
File with the same name is always send to the server.
File name doesn't have the extension so checking file type by extension fails.
We need to figure out a way to provide custom filename so it can be send with upload request. It may be done by adjusting blob object so the browser uses custom name which was added (not 100% sure, my initial tests failed here). The second option is to pass filename to a loader so it is used further in the uploading process (added to formData object).
The text was updated successfully, but these errors were encountered:
During development of the main feature (#246), we have decided that all uploaded images will have image.ext name, which means that server-side implementation of the file uploading should take care of proper naming.
The only problem with Edge is that files are uploaded with blob filename - but apart from that Blob's can be uploaded the same way as File's. So maybe if we had assumed that server-side code takes care of naming, we could upload the blob files in Edge (which seems to be better solution than just removing images from pasted content) and add a proper documentation for this case for handling blob named files. WDYT? cc @Reinmar
mlewand
transferred this issue from ckeditor/ckeditor5-image
Oct 9, 2019
This is a follow up #5172.
Since the
File API
is used during image base64 to file conversion, it doesn't work on Edge asFile
constructor is not supported there (see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/9551546/).Alternatively the
Blob
object could be used, however blobs itself do not provide a way to define a filename. This is problematic since during upload the filename is read from the file object and send with other data:and with
Blob
instance, the filename is always set to "blob":which doesn't work well with upload integration:
We need to figure out a way to provide custom filename so it can be send with upload request. It may be done by adjusting blob object so the browser uses custom name which was added (not 100% sure, my initial tests failed here). The second option is to pass filename to a loader so it is used further in the uploading process (added to
formData
object).The text was updated successfully, but these errors were encountered: