Hi, im using media.selectPhoto() for a user to upload photos to a rest api using base64.
I create a temporay file pass that file to string(binary>string), encode to base64 in the process then send it to the server. the problem is media.selectPhoto() send to the listner when i select the photo too soon. what i mean is the photo is still not created when media.selectPhoto jumps to the listner. i create a delay to correct this so this work with a delay. i don’t like this method, since the time of creating the image i can’t control and the delay, could fail.
My question is, if i remove this all steps of creating tempory files, i could pass direct object to binary>string>base64. is it possible?
if not, shouldn’t the listner on media.selectPhoto when a file is chosed in destiny, get called only after the file is created? i hate using timers.
regards,
Carlos.