on image AfterSelect callback
on image AfterSelect callback
f.talamini@stmingegneria.eu
Posts: 23Questions: 11Answers: 0
in Editor
I need to process an image file after it's selected and before it's uploaded....
How can I do that?
Regards,
Franco
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Just to confirm, you want to process it on the client-side? Currently there is no option to do that in Editor I'm afraid. You would need to modify the
Editor.upload
static method to add that ability.Allan
Yes, client-side. I'd like to compress the images before the upload just to save time.
Thank you.
Franco
Please Allan, can you post a sample of I can modify the Editor.upload static method?
Thank you.
Franco
If you search the Editor code for reader.onload = function ( e ) {`, that is where you would need to make your modification. When that function is executed, the file has been read and you could manipulate it as you need.
Allan