richardgirges / express-fileupload

Simple express file upload middleware that wraps around busboy
MIT License
1.52k stars 261 forks source link

> @blavejr it's still not working. I already have a folder. The "mv" function executes successfully but file never uploaded to give folder. Will the be any issue with express version? #261

Open hadedeji10k opened 3 years ago

hadedeji10k commented 3 years ago

@blavejr it's still not working. I already have a folder. The "mv" function executes successfully but file never uploaded to give folder. Will the be any issue with express version?

not working directories are created but still image is not moving to the directory

Originally posted by @asadalien in https://github.com/richardgirges/express-fileupload/issues/54#issuecomment-602161163

navkc11 commented 2 years ago

hello i have similar problem this create the file in folder, but the file is empty. this what i am write: file.mv(./${filePath})

hadedeji10k commented 2 years ago

Can you share your code?

How you receive the file and how you intend saving the file?

navkc11 commented 2 years ago

i recive the file and path from client app. and save in dir in the server. the dir included in filePath

hadedeji10k commented 2 years ago

Is the image saving but it's null?

Or the image is not getting saved?

navkc11 commented 2 years ago

the file saved in the folder, but withot the content.

navkc11 commented 2 years ago

and in my server, i download a file from the repo in gitlab to this folder. when this heppens suddenly the content loads to the file...

hadedeji10k commented 2 years ago

Have you tried this on your local machine?

Better still, kindly share your current code to know where the issue lies

residentcode commented 7 months ago
const {saveBufferToFile} = require("express-fileupload/lib/utilities");

saveBufferToFile(imageFile.data, uploadPath, function(err) {
            if (err)
                return res.status(500).send(err);
        })