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

@capacitor/filesystem downloadFile does not set execute permission #2214

Open
hugoj-goncalves opened this issue Oct 18, 2024 · 3 comments
Open

Comments

@hugoj-goncalves
Copy link

hugoj-goncalves commented Oct 18, 2024

Bug Report

Plugin(s)

@capacitor/filesystem 6.0.1

Capacitor Version

   Capacitor Doctor   

Latest Dependencies:

  @capacitor/cli: 6.1.2
  @capacitor/core: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/ios: 6.1.2

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/core: 6.1.2

[success] Android looking great! 👌

Platform(s)

Android 13

Current Behavior

execute permission not set
-rw-rw---- 1 u0_a153 media_rw 103608940 2024-10-17 15:33 filename.apk

Expected Behavior

set the execute permission
-rwxrwx--- 1 u0_a153 media_rw 103608940 2024-10-17 16:33 filename.apk

Code Reproduction

Just use the downloadFile method and try to download an apk file

@Ionitron
Copy link
Collaborator

This issue needs more information before it can be addressed.
In particular, the reporter needs to provide a minimal sample app that demonstrates the issue.
If no sample app is provided within 15 days, the issue will be closed.

Please see the Contributing Guide for how to create a Sample App.

Thanks!
Ionitron 💙

@alexgerardojacinto
Copy link
Collaborator

@hugoj-goncalves can you provide a GitHub repo with an app where the issue can be reproduced?

@hugoj-goncalves
Copy link
Author

may be because I was comparing with google-chrome download and it's a system app in the device
in the end I'm not sure if it's really a issue or just my lack of knowledge

I made my app request the necessary permissions and execute it after the download, which worked perfectly fine, some other apps can't execute the downloaded file but it is "good enough" for me already

if you still think it's valid to create a repo I can do it, but it's a simple download using a url and saving it to the /sdcard/Download folder in the device
check if the folder exists first, etc

        const result = await Filesystem.downloadFile({
          url: url,
          path: `Download/${fileName}`,
          directory: Directory.ExternalStorage,
          progress: !!progressCb,
        });

sorry for my english

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants