( key: string, context: StorageContext )
| 755 | * Useful for services that need direct S3 access (e.g., AWS Textract async) |
| 756 | */ |
| 757 | export 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 | } |
nothing calls this directly
no test coverage detected