@aws-amplify/storage
Version:
Storage category of aws-amplify
27 lines (24 loc) • 1.13 kB
JavaScript
import { isAmplifyContext, getGlobalContext } from '@aws-amplify/core';
import { remove as remove$1 } from '../../providers/s3/apis/internal/remove.mjs';
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
function remove(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 remove$1(ctx, {
path: input.path,
options: {
useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,
bucket: input?.options?.bucket,
expectedBucketOwner: input?.options?.expectedBucketOwner,
locationCredentialsProvider: input?.options?.locationCredentialsProvider,
customEndpoint: input?.options?.customEndpoint,
onProgress: input?.options?.onProgress,
},
});
}
export { remove };
//# sourceMappingURL=remove.mjs.map