Skip to content

Support for multiple field names  #321

@lamasagar

Description

@lamasagar

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions