Closed erossini closed 2 years ago
Check the documentation for imageUploadFunction
. If that option is given, you should write a custom upload function in it, and it will replace the default uploading logic. The editor will only show the result when onSuccess
is called.
The file in your "console.log(file);
" is this type: https://developer.mozilla.org/en-US/docs/Web/API/File, I think file.arrayBuffer()
will be useful to you.
Thank you. I found how to have the file!
I have a working example! Thank you
I try to use this library with Blazor and here you fine the repo. It is working.
The problem I get is to upload a file. Using only a simple HTML page
The result is this one (there some same Xs)
I drop and image on the textbox, I don't see any request from the page to the API.
What I expect is that the EasyMDE calls the API to save the file. So, the API return the path of the image.
Then, my question. All my APIs have a strict security, so I have to customize the call to the API. For that, I like to have the content of the file. With the content of the file (in a byte[] format or in base64) I can write a custom call and then give to the EasyMDE the path of the image.
Is it possible to have something like that?
Thank you in advance, Enrico