@aws-amplify/storage
Version:
Storage category of aws-amplify
1 lines • 1.03 kB
Source Map (JSON)
{"version":3,"file":"resolveFinalKey.mjs","sources":["../../../../../src/providers/s3/utils/resolveFinalKey.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { STORAGE_INPUT_KEY } from './constants';\n/**\n * Resolves the final S3 key based on input type and key prefix.\n *\n * @param inputType - The type of input (key-based or path-based)\n * @param objectKey - The object key from the input\n * @param keyPrefix - The key prefix to prepend for key-based inputs\n * @returns The final S3 key to use for the operation\n */\nexport const resolveFinalKey = (inputType, objectKey, keyPrefix) => {\n return inputType === STORAGE_INPUT_KEY\n ? `${keyPrefix}${objectKey}`\n : objectKey;\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,KAAK;AACpE,IAAI,OAAO,SAAS,KAAK;AACzB,UAAU,CAAC,EAAE,SAAS,CAAC,EAAE,SAAS,CAAC;AACnC,UAAU,SAAS;AACnB;;;;"}