readme update to reflect that resume is only supported on iOS

This commit is contained in:
Elad Gil 2017-08-02 19:01:00 +03:00
parent 89fc39dcce
commit dcbd64a59e

View File

@ -460,7 +460,7 @@ type DownloadFileOptions = {
progressDivider?: number; progressDivider?: number;
begin?: (res: DownloadBeginCallbackResult) => void; begin?: (res: DownloadBeginCallbackResult) => void;
progress?: (res: DownloadProgressCallbackResult) => void; progress?: (res: DownloadProgressCallbackResult) => void;
resumable?: () => void; resumable?: () => void; // only supported on iOS yet
connectionTimeout?: number // only supported on Android yet connectionTimeout?: number // only supported on Android yet
readTimeout?: number // only supported on Android yet readTimeout?: number // only supported on Android yet
}; };
@ -509,17 +509,17 @@ If `progressDivider` = 0, you will receive all `progressCallback` calls, default
the fetch interval in `didFinishLaunchingWithOptions`. The `performFetchWithCompletionHandler` the fetch interval in `didFinishLaunchingWithOptions`. The `performFetchWithCompletionHandler`
callback is handled by RNFS. callback is handled by RNFS.
If `options.resumable` is provided, it will be invoked when the download has stopped and and can be resumed using `resumeDownload()`. (IOS only): If `options.resumable` is provided, it will be invoked when the download has stopped and and can be resumed using `resumeDownload()`.
### `stopDownload(jobId: number): void` ### `stopDownload(jobId: number): void`
Abort the current download job with this ID. The partial file will remain on the filesystem. Abort the current download job with this ID. The partial file will remain on the filesystem.
### `resumeDownload(jobId: number): void` ### (iOS only) `resumeDownload(jobId: number): void`
Resume the current download job with this ID. Resume the current download job with this ID.
### `isResumable(jobId: number): Promise<bool>` ### (iOS only) `isResumable(jobId: number): Promise<bool>`
Check if the the download job with this ID is resumable with `resumeDownload()`. Check if the the download job with this ID is resumable with `resumeDownload()`.