UNPKG

@aws-amplify/storage

Version:

Storage category of aws-amplify

28 lines (25 loc) 1.34 kB
import { isAmplifyContext, getGlobalContext } from '@aws-amplify/core'; import { getProperties as getProperties$1 } from '../../providers/s3/apis/internal/getProperties.mjs'; // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 function getProperties(ctxOrInput, maybeInput) { // Resolve the optional leading context. The global context is resolved at // CALL time (never cached) so single-arg callers follow live configuration. const [ctx, input] = isAmplifyContext(ctxOrInput) ? [ctxOrInput, maybeInput] : [getGlobalContext(), ctxOrInput]; return getProperties$1(ctx, { path: input.path, options: { useAccelerateEndpoint: input?.options?.useAccelerateEndpoint, bucket: input?.options?.bucket, locationCredentialsProvider: input?.options?.locationCredentialsProvider, expectedBucketOwner: input?.options?.expectedBucketOwner, customEndpoint: input?.options?.customEndpoint, }, // Type casting is necessary because `getPropertiesInternal` supports both Gen1 and Gen2 signatures, but here // given in input can only be Gen2 signature, the return can only ben Gen2 signature. }); } export { getProperties }; //# sourceMappingURL=getProperties.mjs.map