Download File

Download File at Specified URL

Run the following Median JavaScript Bridge command to initiate the download of the file at the specified URL.

↔️Median JavaScript Bridge

To download a file:

median.share.downloadFile({url: '', open: true|false})
// Note: 'open' is an Android-only parameter, refer to below

On iOS, the file is downloaded and passed to the "open with" system dialog.

On Android, if Downloads Folder is set on the Permissions tab, by default the file will be downloaded silently. If the open: true parameter is set once the download is complete an "open with" dialog will be displayed.

On Android, if Private to App is set on the Permissions tab, the file will be downloaded internally and your app will always display an "open with" dialog.

Save Image to Photos

↔️Median JavaScript Bridge

To download an image to the user's iOS photo library / Android photo gallery:

median.share.downloadImage({url: ''})


Developer Demo

Display our demo page in your app to test during development

Next Steps