dekyfin / RichFilemanager-NODE

A nodejs connector for RichFilemanager
MIT License
12 stars 11 forks source link

Allow user to specify temporary upload directory #9

Open joaogodinho opened 5 years ago

joaogodinho commented 5 years ago

I added a parameter to the initialization of the module to allow a user to specify where to initially save uploaded files (multer dest param).

I made this as a solution to the fs.rename. If the destination path is mounted in a different device as the multer destination folder, a EXDEV is raised.

joaogodinho commented 5 years ago

Hi,

Maybe use the already existing config file/path for it then? e.g. if there is a multer object in the config, pass it to multer? Or is that config strictly for the rich file manager options and shouldn't include implementation specific stuff?

dekyfin commented 5 years ago

Exactly. The existing config is for RichFileManager and not implementation configuration. I would like us to use the third parameter for extra config

iainbryson commented 5 years ago

Hello!

Good timing, I'm running into the same issue.

I'm wondering why not use a package like https://www.npmjs.com/package/mv instead (or in addition). In my case, it would be cleaner to not have the temp folder in the target directory (which is mounted as a shared docker volume and it meant to contain only the public files).