We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var multer = require('multer'); var upload = multer({ // dest: '~/uploads/' --> Does not work dest: '/home/santosh/uploads/' // --> Works });
Multer actually ends up creating a folder named "~" under the app root folder.
The text was updated successfully, but these errors were encountered:
This is expected behaviour and is how all other fs-functions work in Node.js.
fs
Can I recommend you to use the untildify package to solve this?
const multer = require('multer') const untildify = require('untildify') const upload = multer({ dest: untildify('~/uploads') }) // ...
Sorry, something went wrong.
@LinusU thanks. I was not aware of that.
For more info...
See this discussion which contains links to even more discussions.
Also, untildify references the home dir that will replace the tilde via the os module.
os
const os = require('os'); const home = os.homedir();
No branches or pull requests
Multer actually ends up creating a folder named "~" under the app root folder.
The text was updated successfully, but these errors were encountered: