xdan / jodit

Jodit - Best WYSIWYG Editor for You
https://xdsoft.net/jodit/
MIT License
1.71k stars 354 forks source link

Get file name of drag & drop element (base64) #1089

Open barisortac opened 8 months ago

barisortac commented 8 months ago

It is not possible to get the file name from a dropped image when we enable base64 drop (insertImageAsBase64URI: true). However, sendFiles function is able to get the file name from fileList property (i.e. file.name). Is there a workaround to get the file name of the dropped image/file? I only use base64 feature of the editor, I convert them uploaded file in my backend.

It is also not possible to overwrite the existing uploader module, we can only add new ones as I understand.

It would be very nice if the file reader also returns the file name together with other info:

const resp = {
    baseurl: '',
    files: [reader.result],
    filename: file.name, // new field
    isImages: [true]                            
};