MCPcopy Index your code
hub / github.com/simstudioai/sim / getS3InfoForKey

Function getS3InfoForKey

apps/sim/lib/uploads/core/storage-service.ts:757–775  ·  view source on GitHub ↗
(
  key: string,
  context: StorageContext
)

Source from the content-addressed store, hash-verified

755 * Useful for services that need direct S3 access (e.g., AWS Textract async)
756 */
757export function getS3InfoForKey(
758 key: string,
759 context: StorageContext
760): { bucket: string; key: string } {
761 if (!USE_S3_STORAGE) {
762 throw new Error('S3 storage is not configured. Cannot retrieve S3 info for key.')
763 }
764
765 const config = getStorageConfig(context)
766
767 if (!config.bucket) {
768 throw new Error(`S3 bucket not configured for context: ${context}`)
769 }
770
771 return {
772 bucket: config.bucket,
773 key,
774 }
775}

Callers

nothing calls this directly

Calls 1

getStorageConfigFunction · 0.90

Tested by

no test coverage detected