skandertebo / gallerique-backend

0 stars 1 forks source link

File Upload to Azure blob storage #14

Open MohamedRebai41 opened 5 months ago

MohamedRebai41 commented 5 months ago

This is a simple example for how to upload a file to azure blob storage, you can add a multer options object for validation in the second argument of the interceptor

@Post('/test/azure')
  @UseInterceptors(
    AzureStorageFileInterceptor('file', imageUploadValidationOptions),
  )
  uploadFile(@UploadedFile() file: UploadedFileMetadata) {
    return file.storageUrl;
  }
skandertebo commented 5 months ago

noice