Expo File Dl Versions Save

Download files to any folder and notify the user while the download is happening and when the download finishes

2.0.0

3 years ago

This release adds an option for one to retrieve information on the progress of a download, by passing a callback which matches the following type (from expo-filesystem):

export type DownloadProgressCallback = (data: DownloadProgressData) => void;

export type DownloadProgressData = {
  totalBytesWritten: number;
  totalBytesExpectedToWrite: number;
};

A good example of the kind of callback you might want to pass in here is available in the README

Breaking Changes

Previously downloadToFolder was called as follows (with the latter two arguments being optional):

await downloadToFolder(uri, filename, folder, channelId, {notification: 'custom'}, customNotificationConfig);

Now, with the new option to add a callback to retrieve download progress, the optional arguments have been grouped together in one options argument (with only the options argument being optional), as follows:

await downloadToFolder(uri, filename, folder, channelId, {
  notificationType: {notification: 'custom'},
  notificationContent: customNotificationConfig,
  downloadProgressCallback: callback,
});

1.1.0

3 years ago

All dependencies updated to work with Expo SDK 40. Now allows for downloading any and all file types on iOS. Images on iOS download straight to the Photo Library, all other files on iOS the user must manually select to save them to the filesystem. Android is unchanged.

1.0.3

3 years ago

Same package is used by both managed and bare workflow (i.e. expo-powered apps and plain react-native apps). This should result in less confusion and dependencies

1.0.1

3 years ago

This has the minimum dependencies and minimum package size possible. Build script is simple (just tsc) and no extraneous files are included in the package.