owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.81k stars 3.05k forks source link

Sharing Log Files seamlessly within the ownCloud Android App #4215

Closed Aitorbp closed 9 months ago

Aitorbp commented 10 months ago

Related Issues

App:https://github.com/owncloud/android/issues/4156

QA

jesmrec commented 9 months ago

Feature works fine, ownCloud is now an option to share logs.

But i noticed that the shared log file uses .bin extension. Maybe not related with this but it deserves a look.

Aitorbp commented 9 months ago

There are internal android studio method that do not recognize .log extensions, specifically this one: MimeTypeMap.getSingleton().getMimeTypeFromExtension(displayName.substring(index + 1)). Since it does not recognize it, it tries to create a new extension, therefore it puts the .bin in front of the .log.

The .log extension is recognized as a mimeType application/octet-stream, which is a generic MIME type indicating that the contents of the file are binary and not specified more specifically.

The solution that has been carried out in this issue is to put a condition when it is a .log file so that it does not add the .binextension.

jesmrec commented 9 months ago

Fixed and approved