Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(storage): Added callout for storage pause feature #3591

Merged
merged 1 commit into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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