@aws-amplify/storage
Version:
Storage category of aws-amplify
1 lines • 2.25 kB
Source Map (JSON)
{"version":3,"file":"downloadData.mjs","sources":["../../../../src/internals/apis/downloadData.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getGlobalContext, isAmplifyContext, } from '@aws-amplify/core';\nimport { downloadData as downloadDataInternal } from '../../providers/s3/apis/internal/downloadData';\nexport function downloadData(ctxOrInput, maybeInput) {\n // Resolve the optional leading context. The global context is resolved at\n // CALL time (never cached) so single-arg callers follow live configuration.\n const [ctx, input] = isAmplifyContext(ctxOrInput)\n ? [ctxOrInput, maybeInput]\n : [getGlobalContext(), ctxOrInput];\n return downloadDataInternal(ctx, {\n path: input.path,\n options: {\n useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,\n bucket: input?.options?.bucket,\n locationCredentialsProvider: input?.options?.locationCredentialsProvider,\n bytesRange: input?.options?.bytesRange,\n onProgress: input?.options?.onProgress,\n expectedBucketOwner: input?.options?.expectedBucketOwner,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `downloadDataInternal` supports both Gen1 and Gen2 signatures, but here\n // given in input can only be Gen2 signature, the return can only ben Gen2 signature.\n });\n}\n"],"names":["downloadDataInternal"],"mappings":";;;AAAA;AACA;AAGO,SAAS,YAAY,CAAC,UAAU,EAAE,UAAU,EAAE;AACrD;AACA;AACA,IAAI,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,gBAAgB,CAAC,UAAU;AACpD,UAAU,CAAC,UAAU,EAAE,UAAU;AACjC,UAAU,CAAC,gBAAgB,EAAE,EAAE,UAAU,CAAC;AAC1C,IAAI,OAAOA,cAAoB,CAAC,GAAG,EAAE;AACrC,QAAQ,IAAI,EAAE,KAAK,CAAC,IAAI;AACxB,QAAQ,OAAO,EAAE;AACjB,YAAY,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB;AACxE,YAAY,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AAC1C,YAAY,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B;AACpF,YAAY,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU;AAClD,YAAY,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU;AAClD,YAAY,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB;AACpE,YAAY,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AAC1D,SAAS;AACT;AACA;AACA,KAAK,CAAC;AACN;;;;"}