on image AfterSelect callback

on image AfterSelect callback

f.talamini@stmingegneria.euf.talamini@stmingegneria.eu Posts: 23Questions: 11Answers: 0

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

Answers

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Answer ✓

    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

  • f.talamini@stmingegneria.euf.talamini@stmingegneria.eu Posts: 23Questions: 11Answers: 0

    Yes, client-side. I'd like to compress the images before the upload just to save time.
    Thank you.
    Franco

  • f.talamini@stmingegneria.euf.talamini@stmingegneria.eu Posts: 23Questions: 11Answers: 0

    Please Allan, can you post a sample of I can modify the Editor.upload static method?
    Thank you.
    Franco

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    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

This discussion has been closed.