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

Filesystem downloadFile doesn't include URL property as DownloadFileOptions​ #1804

Closed
mcfarljw opened this issue Sep 20, 2023 · 3 comments
Closed

Comments

@mcfarljw
Copy link

mcfarljw commented Sep 20, 2023

Bug Report

Plugin(s)

@capacitor/filesystem: 5.1.4

Capacitor Version

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

Platform(s)

  • Android
  • iOS

Current Behavior

Typing errors are thrown when trying to specify the download URL with the downloadFile function.

Expected Behavior

The options allow for a url property to be passed with the downloadFile options.

Code Reproduction

// something.ts
await downloadFile({ url: 'something' })

Other Technical Details

https://github.com/ionic-team/capacitor-plugins/blob/main/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/Filesystem.java#L308 does show a url property is accessed but https://github.com/ionic-team/capacitor-plugins/blob/main/filesystem/src/definitions.ts#L485-L515 doesn't include it in the definition typings.

https://capacitorjs.com/docs/apis/filesystem#downloadfileoptions

@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 💙

@mcfarljw
Copy link
Author

It's just an issue with TypeScript typings. downloadfileoptions doesn't include the url param which is required to download a file.

Here are the params currently listed in the docs: https://capacitorjs.com/docs/apis/filesystem#downloadfileoptions

Here are the params as they currently exist in the definitions file: https://github.com/ionic-team/capacitor-plugins/blob/main/filesystem/src/definitions.ts#L485C1-L515C1

Maybe I'm mistaken on how to use the downloadFile method?

@ionitron-bot
Copy link

ionitron-bot bot commented Oct 10, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Oct 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants