From 3bf204aee9fe03b40a029e76b4d43af3830507bd Mon Sep 17 00:00:00 2001 From: Harshdeep Singh <6162866+harsh62@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:48:42 -0400 Subject: [PATCH] chore: Add transfer acceleration documentation for plugin options (#3125) --- .../Request/StorageDownloadDataRequest.swift | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Amplify/Categories/Storage/Operation/Request/StorageDownloadDataRequest.swift b/Amplify/Categories/Storage/Operation/Request/StorageDownloadDataRequest.swift index 54f3d86fa8..f4f7ee0b83 100644 --- a/Amplify/Categories/Storage/Operation/Request/StorageDownloadDataRequest.swift +++ b/Amplify/Categories/Storage/Operation/Request/StorageDownloadDataRequest.swift @@ -51,12 +51,26 @@ public extension StorageDownloadDataRequest { /// a way to utilize the underlying storage system's functionality. See plugin documentation for expected /// key/values /// + /// As an example, if using the AWSS3StoragePlugin, one may be want to add something like the + /// following (please note that `useAccelerateEndpoint` + /// [should first be setup](https://docs.amplify.aws/lib/storage/transfer-acceleration/q/platform/js/), + /// otherwise, requests will fail): + /// + /// ``` + /// let options = StorageDownloadDataRequest.Options( + /// pluginOptions: [ + /// "useAccelerateEndpoint": true + /// ] + /// ) + /// ``` + /// + /// # Reference + /// * [Storage - Use Transfer Acceleration](https://docs.amplify.aws/lib/storage/transfer-acceleration/q/platform/js/) + /// * [Transfer Acceleration](https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html) + /// /// - Tag: StorageDownloadDataRequestOptions.pluginOptions public let pluginOptions: Any? - // TODO: transferAcceleration should be in pluginOptions - // https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html - /// /// - Tag: StorageDownloadDataRequestOptions.init public init(accessLevel: StorageAccessLevel = .guest,