Skip to content

Commit

Permalink
chore(storage): Added callout for storage pause feature (#3591)
Browse files Browse the repository at this point in the history
  • Loading branch information
royjit authored Sep 21, 2021
1 parent 0e3a75c commit e863726
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/fragments/lib/storage/ios/download.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ func cancelDownload() {

You can also pause and then resume the operation.

<Callout>

Note that pause internally uses the `suspend` api of `NSURLSessionTask`, which suspends the task temporarily and does not fully pause the transfer. Complete pausing of task is tracked in this Github issue - https://github.com/aws-amplify/aws-sdk-ios/issues/3668

</Callout>

```swift
storageOperation.pause()
storageOperation.resume()
Expand Down
6 changes: 6 additions & 0 deletions src/fragments/lib/storage/ios/upload.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ func cancelUpload() {

You can also pause then resume the operation.

<Callout>

Note that pause internally uses the `suspend` api of `NSURLSessionTask`, which suspends the task temporarily and does not fully pause the transfer. Complete pausing of task is tracked in this Github issue - https://github.com/aws-amplify/aws-sdk-ios/issues/3668

</Callout>

```swift
storageOperation.pause()
storageOperation.resume()
Expand Down
6 changes: 6 additions & 0 deletions src/fragments/sdk/storage/ios/transfer-utility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ To pause a transfer, use the `suspend` method:
refUploadTask.suspend()
```

<Callout>

Note that pause internally uses the `suspend` api of `NSURLSessionTask`, which suspends the task temporarily and does not fully pause the transfer. Complete pausing of task is tracked in this Github issue - https://github.com/aws-amplify/aws-sdk-ios/issues/3668

</Callout>

## Resume a Transfer

To resume a transfer, use the `resume` method:
Expand Down

0 comments on commit e863726

Please sign in to comment.