UNPKG

@aws-amplify/storage

Version:

Storage category of aws-amplify

23 lines (21 loc) 848 B
'use strict'; // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveFinalKey = void 0; const constants_1 = require("./constants"); /** * 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 === constants_1.STORAGE_INPUT_KEY ? `${keyPrefix}${objectKey}` : objectKey; }; exports.resolveFinalKey = resolveFinalKey; //# sourceMappingURL=resolveFinalKey.js.map