UNPKG

@aws-amplify/storage

Version:

Storage category of aws-amplify

21 lines (18 loc) 721 B
import { STORAGE_INPUT_KEY } from './constants.mjs'; // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 /** * Resolves the final S3 key based on input type and key prefix. * * @param inputType - The type of input (key-based or path-based) * @param objectKey - The object key from the input * @param keyPrefix - The key prefix to prepend for key-based inputs * @returns The final S3 key to use for the operation */ const resolveFinalKey = (inputType, objectKey, keyPrefix) => { return inputType === STORAGE_INPUT_KEY ? `${keyPrefix}${objectKey}` : objectKey; }; export { resolveFinalKey }; //# sourceMappingURL=resolveFinalKey.mjs.map