We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From client: const xhr = new XMLHttpRequest; xhr.open('POST', '/some/url', true); xhr.send(new FormData(form));
On server: import Router from 'koa-router'; import path from 'path'; import multer from 'koa-multer'; const upload = multer({dest: path.join(__dirname, 'pdf')}); const router = new Router(); router.post('some/url', upload.single('file'), controller)
When multer is saving, it gener for file random name without extension.
The text was updated successfully, but these errors were encountered:
I'm having the issue. But, for the moment, I'm taken the originalname name. You can take the mimetype field to get the file's content type.
originalname
mimetype
Sorry, something went wrong.
No branches or pull requests
From client:
const xhr = new XMLHttpRequest;
xhr.open('POST', '/some/url', true);
xhr.send(new FormData(form));
On server:
import Router from 'koa-router';
import path from 'path';
import multer from 'koa-multer';
const upload = multer({dest: path.join(__dirname, 'pdf')});
const router = new Router();
router.post('some/url', upload.single('file'), controller)
When multer is saving, it gener for file random name without extension.
The text was updated successfully, but these errors were encountered: