@aws-amplify/storage
Version:
Storage category of aws-amplify
23 lines (20 loc) • 970 B
JavaScript
import { userAgentMiddlewareFactory, retryMiddlewareFactory, signingMiddlewareFactory } from '@aws-amplify/core/internals/aws-client-utils';
import { composeTransferHandler } from '@aws-amplify/core/internals/aws-client-utils/composers';
import { contentSha256MiddlewareFactory } from '../contentSha256middleware.mjs';
import { xhrTransferHandler } from '../xhrTransferHandler.mjs';
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
/**
* S3 transfer handler for browser and React Native based on XHR. On top of basic transfer handler, it also supports
* x-amz-content-sha256 header, and request&response process tracking.
*
* @internal
*/
const s3TransferHandler = composeTransferHandler(xhrTransferHandler, [
contentSha256MiddlewareFactory,
userAgentMiddlewareFactory,
retryMiddlewareFactory,
signingMiddlewareFactory,
]);
export { s3TransferHandler };
//# sourceMappingURL=xhr.mjs.map