thank you rob for the tips.
when event.completed happens a copy is made to the sandbox, after that i display the image on the display so the user can confirm his selection. when i select a non image, it will create a black image. (it stills returns true in creating an image) in the background i create a copy of the same file (using filters to check if the image exist and only duplicate if thats the case) so i can send it to the database (i needed to create a copy because i can’t send an image that’s beeing used). it will upload a corrupted image since the source is not an image and then my problems starts…i want to prevent this.
while doing all this, i test if the image exist. all check points i made they all passed.
yes, it is returning true if i select something else. that’s my problem. I think the internal code is not prepared for a non selected image, because it have filters in the beginning trying to not let users select images. in ios i could not select a non image, it will display grey files. in android if i use its browser it will grey files that are not images too. the problem is that android is way open than ios and i can select another file browser easy from the gallery and all files are open for selection. i guess internal code of media.selectPhoto() didn’t expect this could happen and they didn’t use validation after the selection is made.
i will try the event.target.