MCPcopy Create free account
hub / github.com/ShipSecAI/studio / buildObjectKey

Function buildObjectKey

worker/src/destinations/adapters/s3.ts:28–34  ·  view source on GitHub ↗
(config: S3AdapterConfig, fileName: string)

Source from the content-addressed store, hash-verified

26}
27
28function buildObjectKey(config: S3AdapterConfig, fileName: string) {
29 if (config.objectKey) {
30 return config.objectKey.replace(/^\/+/, '');
31 }
32 const prefix = config.pathPrefix?.replace(/^\/+/, '').replace(/\/+$/, '');
33 return prefix ? `${prefix}/${fileName}` : fileName;
34}
35
36export const s3DestinationAdapter: DestinationAdapterRegistration = {
37 id: 's3',

Callers 1

saveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected