(node:2755) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Closed this issue · 4 comments
I have been using npm fi-fileman for uploading an image
it uploads the image to the mvc success fully but it throws the depreciation warining
I am using expressjs
`var express = require('express'),
router = express.Router(),
fileman = require('fi-fileman'),
os = require('os'),
os.tmpDir = os.tmpdir();
router.post("/upload", fileman.multiparser(), function(req, res){
console.log("upload api");
console.log(req.body.name);
res.send(req.files); //it uplods success fully
});`
(node:2755) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Will fix ASAP. Feel free to submit a pull request if you wish :)
thank you man i will submit the pul request I fix my issue with my local dependency
Your fi-fileman is very good middle for File uploading
Thanks! Glad to be helpful.
@Muthukumars1994 finally decided to apply the change since it's just a patch and os.tmpdir
is present since Node.js v0.9.9.
The current tests are passing on Node.js 4, 6 and 8 without deprecation warnings.