Open peter-scholtens opened 4 years ago
Repeating the upload using RiotX already fails at uploading the file with comment "Upload request missing 'Content-Type'". Test with RiotX version 0.17.0 downloaded from F-Droid.
With version 0.18.0 of RiotX, the bug is removed. See https://github.com/vector-im/riotX-android/issues/1075 It still exist in riot-web version 1.5.13.
If the Downloads directory in Android contains the attached picture including a file extension, either .jpg or .jpeg, the created thumbnail will be correctly displayed in Riot. It uses the MIME type JPEG. A small check of (part of) the source shows:
However, if the file extension is lost, the automatic detection refer to the wrong MIME type, or at least it becomes invisble and it refers to the MIME type JPG, thus without E.
Logging the data which passes the triple OR function at line 239 in the file VectorRoomMediasSender.java indeed reveals both cases appear:
As far as I understand there is no functional difference between both types. So would it not be handier to set mimeType to JPEG when JPG is detected? Either here, or in the matrix-android-sdk which apparently can output both types, see the function getMimeType() in RoomMediaMessage.java on the matrix-android-sdk. Any advice would be appreciated.