Node.js/Express – PostgreSQL example – Upload File/Download File – Multer + Sequelize CRUD
In the tutorial, we show how to build a Node.js/Express RestAPIs to Upload Files/Download Files to PostgreSQL using Multer middleware and Sequelize ORM.
Related posts:
Expose 3 RestAPIs:
router.post('/api/file/upload', upload.single("file"), fileWorker.uploadFile);
router.get('/api/file/info', fileWorker.listAllFiles);
router.get('/api/file/:id', fileWorker.downloadFile);
Upload file:
-> PostgreSQL’s records:
Download file:
More at:
Node.js/Express – PostgreSQL example – Upload File/Download File – Multer + Sequelize CRUD
#nodejs #crud #postgresql #sequelize #multer