Expected behavior
File uploads should respect the storage settings passed in via env variables (ie either BLOB_STORAGE_PATH if using local storage or the S3_* variables).
And multer will try to create the destination directory if passed as a string and if it does not exist:
Note: You are responsible for creating the directory when providing destination as a function. When passing a string, multer will make sure that the directory is created for you.
https://www.npmjs.com/package/multer#diskstorage
Yep, I think we should definitely change the hard coded multer path to either whatever env variables that was set, if not, default to the hard coded path
Describe the bug Flowise uses a hard coded folder path for some file uploads. This breaks on read-only file systems and cannot be configured.
To Reproduce Steps to reproduce the behavior:
Expected behavior File uploads should respect the storage settings passed in via env variables (ie either
BLOB_STORAGE_PATH
if using local storage or theS3_*
variables).Setup
Additional context Hardcoded paths are here:
And
multer
will try to create the destination directory if passed as a string and if it does not exist:There seems to already be some functionality for getting the right paths elsewhere: https://github.com/FlowiseAI/Flowise/blob/d0571291b76883a60cec7a004069a4175647172c/packages/server/src/controllers/get-upload-path/index.ts#L4