Open tomsaleeba opened 4 years ago
@j-robinson this is still a problem with the app. This ticket a low priority, but if you have nothing else to do, it would be good to improve the user experience so at the minimum they get an informative error message, something like
hey, it looks like you've attached an unsupported file type. This observation may fail to upload as iNaturalist will reject it.
We define the MIME types we would like (link to code) but the user can ignore that and attach anything. I just verified on Android and desktop Chrome.
Honestly, every image from a phone should be a JPEG. I added PNG for us so we can attach whatever images we have in our downloads directory. The easiest solution might be to check the mime type (we already get this here) and notify the user if it's not a type we support.
I'm a bit worried about just rejecting the photo the user attaches in case there's some weird edge case we haven't thought of and suddenly our users cannot upload anything. If you can prove that's not a concern, then for sure you can reject the photo with an error message. If we're still not sure, maybe accept the photo and just give a warning that the upload might not work (see above for an example message).
Steps:
Expected: Our app will catch the incorrect type of file attached and give the user a detailed error before we let them save.
Actual: The obs saves and will be processed for upload, where iNat will reject it with a 4xx HTTP error because it doesn't support videos. Our app will report some generic failure to upload.
Perhaps we should also add some text to the app that indicates we only want photos attached?