Skip to content

Solution ,This works perfectly #968

New issue

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

Closed
HipsterSantos opened this issue Jan 3, 2021 · 1 comment
Closed

Solution ,This works perfectly #968

HipsterSantos opened this issue Jan 3, 2021 · 1 comment

Comments

@HipsterSantos
Copy link

first create folder , public/upload
set
app.use(express.static(__dirname+'/public');

const storage = multer.diskStorage({
destination: (req,file,cb)=>{
cb(null,'public/upload');
},
filename: (req,file,cb)=>{
console.log(file);
cb(null,file.fieldname+'_'+Date.now()+path.extname(file.originalname));
}
});

@bjohansebas
Copy link
Member

Do you have any problem with Multer?

@bjohansebas bjohansebas closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants