arozar / multer-google-storage

Multer storage engine implementation that allows the easy uploading of files to google storage
49 stars 59 forks source link

Error [object Object] #18

Open letmemad opened 4 years ago

letmemad commented 4 years ago

Hi, I'm trying use the multer google storage but it's giving me a error: [object Object].

Multer config file: `const multer = require('multer') const multerGoogleStorage = require('multer-google-storage')

module.exports = multer({ storage: multerGoogleStorage.storageEngine({ filename: (req, file, cb) => { cb(null,${Date.now()}_${file.originalname}); },

    keyFilename: process.env.GCS_KEYFILE,
    projectId: process.env.GCLOUD_PROJECT,
    bucket: process.env.GCS_BUCKET,
}),
limits: {
    fileSize: 700 * 1024 * 1024
}

})`

rewa15 commented 4 years ago

Hey, did you get a solution to this error? I am facing the same error.

ginixsan commented 3 years ago

same here

ghyath5 commented 2 years ago

Same error !!!!! did you find a solution ?

avizuber commented 1 year ago

I found that if I switched off of multer-google-storage to raw multer, I get better error messages. In my case I had a typo in my bucket name. I've seen other people say that your bucket needs to have Fine-grained access.