Add dedicated blog image upload config separate from product thumbs.
Introduce MULTER_BLOG_IMAGE_* and VITE_BLOG_IMAGE_* env vars with backend multer helper and CMS config wiring for prod builds.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { getProductThumbMulterConfig } from '../../../config';
|
||||
import { getBlogImageMulterConfig } from '../../../config';
|
||||
import { getBlogImagesDir } from '../../../config/uploadPaths';
|
||||
import { createDiskStorageUploadOptions } from '../../../utils/createDiskStorageUploadOptions';
|
||||
import { createUploadFilePipe } from '../../../utils/createUploadFilePipe';
|
||||
@@ -7,6 +7,6 @@ const uploadDir = getBlogImagesDir();
|
||||
|
||||
export const blogImageUploadOptions = createDiskStorageUploadOptions(uploadDir);
|
||||
|
||||
const { allowedMimes, maxFileBytes } = getProductThumbMulterConfig();
|
||||
const { allowedMimes, maxFileBytes } = getBlogImageMulterConfig();
|
||||
|
||||
export const blogImageFilePipe = createUploadFilePipe(allowedMimes, maxFileBytes);
|
||||
|
||||
Reference in New Issue
Block a user