hotwired / turbo-android

Android framework for making Turbo native apps
MIT License
408 stars 51 forks source link

Add correct MIME type "image/jpeg" on image capture for file uploads #259

Closed connorbey13 closed 10 months ago

connorbey13 commented 1 year ago

141 is an awesome feature but was not working out of the gate. I was not using "image/*" and saw that "image/jpg" was also set for accept but since I had "image/jpeg" it didn't work right away. There is no MIME type "image/jpg" and the actual type is "image/jpeg". This commit adds the correct MIME type while keeping "image/jpg" for anyone that used that with this feature. It'd probably be good to add more common image types in the future.

Also changed to .contains instead of == so that if the string matches anywhere in accept it will be enabled. This will streamline using the feature as it is common to have multiple types such as accept="image/jpeg, image/png, image/webp".

olliekav commented 11 months ago

Any chance of getting this branch merged?

jayohms commented 10 months ago

Closing in favor of https://github.com/hotwired/turbo-android/pull/282