Initial commit: Mana Collection NestJS backend.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Parspack S3 object key layout (same bucket as Mado/Balout):
|
||||
*
|
||||
* mana-collection/
|
||||
* products/main/{uuid}{ext}
|
||||
* products/gallery/{uuid}{ext}
|
||||
* blogs/{uuid}{ext}
|
||||
* brands/{uuid}{ext}
|
||||
* users/{uuid}{ext}
|
||||
* stores/{uuid}{ext}
|
||||
* temp/{uuid}{ext}
|
||||
*/
|
||||
const ROOT = 'mana-collection';
|
||||
|
||||
export function productMainKey(fileName: string): string {
|
||||
return `${ROOT}/products/main/${fileName}`;
|
||||
}
|
||||
|
||||
export function productGalleryKey(fileName: string): string {
|
||||
return `${ROOT}/products/gallery/${fileName}`;
|
||||
}
|
||||
|
||||
export function blogMediaKey(fileName: string): string {
|
||||
return `${ROOT}/blogs/${fileName}`;
|
||||
}
|
||||
|
||||
export function brandMediaKey(fileName: string): string {
|
||||
return `${ROOT}/brands/${fileName}`;
|
||||
}
|
||||
|
||||
export function userMediaKey(fileName: string): string {
|
||||
return `${ROOT}/users/${fileName}`;
|
||||
}
|
||||
|
||||
export function storeMediaKey(fileName: string): string {
|
||||
return `${ROOT}/stores/${fileName}`;
|
||||
}
|
||||
|
||||
export function tempMediaKey(fileName: string): string {
|
||||
return `${ROOT}/temp/${fileName}`;
|
||||
}
|
||||
Reference in New Issue
Block a user