@aws-amplify/storage
Version:
Storage category of aws-amplify
28 lines (26 loc) • 1.21 kB
JavaScript
;
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.remove = remove;
const core_1 = require("@aws-amplify/core");
const remove_1 = require("../../providers/s3/apis/internal/remove");
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] = (0, core_1.isAmplifyContext)(ctxOrInput)
? [ctxOrInput, maybeInput]
: [(0, core_1.getGlobalContext)(), ctxOrInput];
return (0, remove_1.remove)(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,
},
});
}
//# sourceMappingURL=remove.js.map