Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the file extension is upper case the file can't be opened #637

Closed
nilsreichardt opened this issue May 3, 2023 · 0 comments · Fixed by #639
Closed

When the file extension is upper case the file can't be opened #637

nilsreichardt opened this issue May 3, 2023 · 0 comments · Fixed by #639
Assignees
Labels
bug Something isn't working. feature: universal file features File features (downloading, preview, etc.) that are used by multiple Sharezone features. platform: android

Comments

@nilsreichardt
Copy link
Member

Steps to reproduce

  1. Go to "Dateiablage"
  2. Upload a file where the file extension is upper case
  3. Click on the file
  4. Click on "Datei herunterladen"

Logs

open file result: the /data/data/de.codingbrain.sharezone.dev/cache/libCachedImageData/Warning.png file does not exists

Code

// Für Android ist es besser, wenn die Extension der File lowerCase
// gemacht wird, damit Android die korrekte App nutzt, um die Datei
// zu öffnen. Ist die Endung PNG z. B. großgeschrieben, weiß Android
// nicht, wie es geöffnet werden soll.
// iOS öffnet jedoch auch die richtige App, wenn die Endung großgeschrieben
// ist. Jedoch muss der Path zur File case-sensitive, wodurch die Endung
// nicht bearbeitet werden darf. Deswegen gibt es die Unterscheidung
// zwischen iOS und Android
if (PlatformCheck.isIOS) {
OpenFile.open(future.data.getPath());
} else {
OpenFile.open(

@nilsreichardt nilsreichardt added bug Something isn't working. platform: android feature: universal file features File features (downloading, preview, etc.) that are used by multiple Sharezone features. labels May 3, 2023
@nilsreichardt nilsreichardt self-assigned this May 5, 2023
nilsreichardt added a commit that referenced this issue May 5, 2023
… file (#639)

Fixes opening files with an uppercase extension (e.g. `pic.PNG`) on
Android.

We couldn't reproduce the behavior that was mentioned in the comment,
which was originally used to fix opening files with an uppercase
extension but which now hinders it.

Fixes #637
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. feature: universal file features File features (downloading, preview, etc.) that are used by multiple Sharezone features. platform: android
Projects
None yet
1 participant