Skip to content
New issue

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

Support for multiple field names #321

Open
lamasagar opened this issue Dec 24, 2020 · 0 comments
Open

Support for multiple field names #321

lamasagar opened this issue Dec 24, 2020 · 0 comments

Comments

@lamasagar
Copy link

I have a form to upload two images with different names say 'avatar' and 'background'
When i use

GCloudStorageFileInterceptor('background', undefined, {
  prefix: 'background',
  predefinedAcl: 'private'
}),
GCloudStorageFileInterceptor('avatar', undefined, {
  prefix: 'avatar',
  predefinedAcl: 'private'
}),

I get Unexpected field error

@nestjs/platform-express supports has FileFieldsInterceptor which can take multiple fields

@UseInterceptors(FileFieldsInterceptor([
  { name: 'avatar', maxCount: 1 },
  { name: 'background', maxCount: 1 },
]))

Is there a way to do this with @aginix/nestjs-gcloud-storage ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant