kathawala / expo-file-dl

Download files to any folder and notify the user while the download is happening and when the download finishes
MIT License
44 stars 8 forks source link

expose download http headers to API #14

Open hannah-eklund opened 3 years ago

hannah-eklund commented 3 years ago

I need to add an authorization header to download the file with a http request

This method has 3 parameters, but only 2 are exposed to the API: https://github.com/kathawala/expo-file-dl/blob/5c98fe8c459a411b030a6e691841a008c909728a/src/index.ts#L148

medigvijay commented 3 years ago

Yup, there seems no way to pass other http options

kathawala commented 3 years ago

This is a good idea. Happy to accept PRs which expose the options argument from here: https://docs.expo.dev/versions/latest/sdk/filesystem/#filesystemdownloadasyncuri-fileuri-options. It could be as simple as passing options through to the downloadAsync call Otherwise, I'll try to get to it, but I have other issues to get to first, namely enabling this to work with Android SAF