|
1 | 1 | import { createLogger } from '@/lib/logs/console/logger' |
| 2 | +import { USE_BLOB_STORAGE, USE_S3_STORAGE } from '@/lib/uploads/config' |
2 | 3 | import type { BlobConfig } from '@/lib/uploads/providers/blob/types' |
3 | 4 | import type { S3Config } from '@/lib/uploads/providers/s3/types' |
4 | | -import { USE_BLOB_STORAGE, USE_S3_STORAGE } from '../config' |
5 | | -import type { FileInfo, StorageConfig } from '../shared/types' |
6 | | -import { sanitizeFileKey } from '../utils/file-utils' |
| 5 | +import type { FileInfo, StorageConfig } from '@/lib/uploads/shared/types' |
| 6 | +import { sanitizeFileKey } from '@/lib/uploads/utils/file-utils' |
7 | 7 |
|
8 | 8 | const logger = createLogger('StorageClient') |
9 | 9 |
|
10 | | -export type { FileInfo, StorageConfig } from '../shared/types' |
| 10 | +export type { FileInfo, StorageConfig } from '@/lib/uploads/shared/types' |
11 | 11 |
|
12 | 12 | /** |
13 | 13 | * Validate and resolve local file path ensuring it's within the allowed directory |
@@ -283,7 +283,7 @@ export async function getFileMetadata( |
283 | 283 |
|
284 | 284 | if (USE_BLOB_STORAGE) { |
285 | 285 | const { getBlobServiceClient } = await import('@/lib/uploads/providers/blob/client') |
286 | | - const { BLOB_CONFIG } = await import('../config') |
| 286 | + const { BLOB_CONFIG } = await import('@/lib/uploads/config') |
287 | 287 |
|
288 | 288 | let blobServiceClient = await getBlobServiceClient() |
289 | 289 | let containerName = BLOB_CONFIG.containerName |
@@ -314,7 +314,7 @@ export async function getFileMetadata( |
314 | 314 | if (USE_S3_STORAGE) { |
315 | 315 | const { getS3Client } = await import('@/lib/uploads/providers/s3/client') |
316 | 316 | const { HeadObjectCommand } = await import('@aws-sdk/client-s3') |
317 | | - const { S3_CONFIG } = await import('../config') |
| 317 | + const { S3_CONFIG } = await import('@/lib/uploads/config') |
318 | 318 |
|
319 | 319 | const s3Client = getS3Client() |
320 | 320 | const bucket = customConfig?.bucket || S3_CONFIG.bucket |
|
0 commit comments