File uploading with fastify adapter doesn't work
See original GitHub issueI’m submitting a…
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
File-uploading with fastify adapter results in Unsupported Media Type: multipart/form-data; boundary=----WebKitFormBoundarybFtFByqN8yn20quJ error.
I have also tried
const adapter = new FastifyAdapter();
adapter.register(require('fastify-multipart'));
await NestFactory.create(AppModule, adapter);
which results in TypeError: req.pipe is not a function
Expected behavior
Works properly
Minimal reproduction of the problem with instructions
await NestFactory.create(AppModule, new FastifyAdapter());
And what is described in https://docs.nestjs.com/techniques/file-upload
What is the motivation / use case for changing the behavior?
File uploading should work with FaastifyAdapter
Environment
Nest version: 5.0.1
For Tooling issues:
- Node version: v10.5.0
- Platform: Mac
Others: N/A
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Upload files using multipart with Fastify and NestJS - Medium
First install the multipart package from the repository. Create a new folder “uploads” in your project folder.
Read more >Nestjs - file upload with fastify multipart - Stack Overflow
I'm using GraphQL, and I've the same issue. Do you know how to make it work with GraphQL? Related issue and small example...
Read more >How to handle Node.js file uploads with Fastify - Snyk
Set up a file upload plugin To do this, you need to import multipart from '@fastify/multipart' and then register it. Here you registered ......
Read more >NestJS Upload File with FastifyAdapter - DEV Community
Today I'm gonna implement a fastify-multer upload image for NestJS using FastifyAdapter(), Look! is it possible? Multer cannot process data ...
Read more >@webundsoehne/nest-fastify-file-upload - npm
@webundsoehne/nest-fastify-file-upload. TypeScript icon, indicating that this package has built-in type declarations.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The doc ( at least the
file-uploadpage ) says nothing about fastify compatibility. I think it’s better to mention in the doc to make users less confusing @kamilmysliwiecThis thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.