It's mentioned in the documentation that Nestjs provides a built-in module for multer. However, on trying to import it from the @nestjs/common
we received an error that the package doesn't have any exported member with that name.
"/node_modules/@nestjs/common"' has no exported member 'MulterModule'.
import { Module, MulterModule } from '@nestjs/common';
@Module({
imports: [
MulterModule.register({
dest: './public',
}),
],
})
export class AppModule { }
Nest version: 6.14.2
For Tooling issues:
- Node version: 13.6.0
- Platform: Windows 10
The MulterModule
comes from the @nestjs/platform-express
package
@jmcdo29 it isn't mentioned in the docs anywhere. Can please someone update the documentation for the same.
Thanks.
You wanna make a PR for it? The docs are open source so this stuff can get fixed. It is implicitly mentioned, but only in passing at the beginning of the article
Warning
Multer cannot process data which is not in the supported multipart format (multipart/form-data). Also, note that this package is not compatible with the FastifyAdapter.
Which _could_ lead one to believe it'll be from the platform-express
package, but as it isn't explicit, it is a bit confusing
Thanks and sure I will make a PR for it.
I've just added a hint
Thank you for your contribution though
Most helpful comment
The
MulterModule
comes from the@nestjs/platform-express
package