* Create an S3 config from StorageConfig * @throws Error if required properties are missing
(config: StorageConfig)
| 52 | * @throws Error if required properties are missing |
| 53 | */ |
| 54 | function createS3Config(config: StorageConfig): S3Config { |
| 55 | if (!config.bucket || !config.region) { |
| 56 | throw new Error('S3 configuration missing required properties: bucket and region') |
| 57 | } |
| 58 | |
| 59 | return { |
| 60 | bucket: config.bucket, |
| 61 | region: config.region, |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Insert file metadata into the database |
no outgoing calls
no test coverage detected