File Uploads

You can upload files via the React form using an input prop of file. The file component supports multiple file uploads using a drag & drop interface.

Uploads are handled on the server using multer and stored in the /uploads directory.

There is a utility API endpoint you can use for uploading files.

/api/utility/upload

Alternatively, if you want to upload a file to another endpoint you'll need to use the multer middleware in the same manner as the utility endpoint.

const multer = require('multer');
const upload = multer({ dest: 'uploads' });
api.post('/api/utility/upload', upload.any(), use(utilityController.upload));