* Get chat storage configuration based on current storage provider
()
| 781 | * Get chat storage configuration based on current storage provider |
| 782 | */ |
| 783 | async function getChatStorageConfig(): Promise<StorageConfig> { |
| 784 | const { USE_S3_STORAGE, USE_BLOB_STORAGE } = await import('@/lib/uploads/config') |
| 785 | |
| 786 | if (USE_BLOB_STORAGE) { |
| 787 | return { |
| 788 | containerName: BLOB_CHAT_CONFIG.containerName, |
| 789 | accountName: BLOB_CHAT_CONFIG.accountName, |
| 790 | accountKey: BLOB_CHAT_CONFIG.accountKey, |
| 791 | connectionString: BLOB_CHAT_CONFIG.connectionString, |
| 792 | } |
| 793 | } |
| 794 | |
| 795 | if (USE_S3_STORAGE) { |
| 796 | return { |
| 797 | bucket: S3_CHAT_CONFIG.bucket, |
| 798 | region: S3_CHAT_CONFIG.region, |
| 799 | } |
| 800 | } |
| 801 | |
| 802 | return {} |
| 803 | } |
no outgoing calls
no test coverage detected