mirror of
https://git.meshkee.com/BaloutPastry/backend.git
synced 2026-08-11 22:31:00 +04:30
Initial commit of Balout Pastry NestJS API.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Parspack S3 object key layout (path-style public URLs):
|
||||
*
|
||||
* balout/
|
||||
* products/main/{uuid}{ext}
|
||||
* products/gallery/{uuid}{ext}
|
||||
* categories/{uuid}{ext}
|
||||
* branches/{uuid}{ext}
|
||||
* users/{uuid}{ext}
|
||||
* temp/{uuid}{ext}
|
||||
*/
|
||||
const ROOT = 'balout';
|
||||
|
||||
export function productMainKey(fileName: string): string {
|
||||
return `${ROOT}/products/main/${fileName}`;
|
||||
}
|
||||
|
||||
export function productGalleryKey(fileName: string): string {
|
||||
return `${ROOT}/products/gallery/${fileName}`;
|
||||
}
|
||||
|
||||
export function categoryMediaKey(fileName: string): string {
|
||||
return `${ROOT}/categories/${fileName}`;
|
||||
}
|
||||
|
||||
export function branchMediaKey(fileName: string): string {
|
||||
return `${ROOT}/branches/${fileName}`;
|
||||
}
|
||||
|
||||
export function userMediaKey(fileName: string): string {
|
||||
return `${ROOT}/users/${fileName}`;
|
||||
}
|
||||
|
||||
export function tempMediaKey(fileName: string): string {
|
||||
return `${ROOT}/temp/${fileName}`;
|
||||
}
|
||||
Reference in New Issue
Block a user