0

My issue is whenever a user uploads images through a mobile device, the images will show while the user is still logged in. When the user logs out then logs back in, those mobile uploads do not show anymore. All uploads through desktop work.

This is how I set up multer.

const multer = require("multer")

const storage = multer.diskStorage({
  destination: function (req, file, callback) {
    callback(null, "./images")
  },
  filename: function (req, file, cb) {
    cb(null, file.originalname)
  },
})
const upload = multer({
  limits: {
    fileSize: 1024 * 1024 * 1024,
    fieldSize: 50 * 1024 * 1024,
  },
  storage: storage,
})

router.post('/',upload.single('image'), createPost)
JesseR92
  • 3
  • 4
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 18 '23 at 03:39

0 Answers0