mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 21:59:40 +00:00
feat: generate upload signed url for oci
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsEnum, IsString } from 'class-validator';
|
||||
import { i18nValidationMessage as i18n } from 'nestjs-i18n';
|
||||
import { DocumentType } from '~/document/enums';
|
||||
|
||||
export class GenerateUploadSignedUrlRequestDto {
|
||||
@ApiProperty({ enum: DocumentType })
|
||||
@IsEnum(DocumentType, { message: i18n('validation.IsEnum', { path: 'general', property: 'document.documentType' }) })
|
||||
documentType!: DocumentType;
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@IsString({ message: i18n('validation.IsString', { path: 'general', property: 'document.document.extension' }) })
|
||||
extension!: string;
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@IsString({ message: i18n('validation.IsString', { path: 'general', property: 'document.originalFileName' }) })
|
||||
originalFileName!: string;
|
||||
}
|
@ -1 +1,2 @@
|
||||
export * from './generate-upload-signed-url.request.dto';
|
||||
export * from './upload-document.request.dto';
|
||||
|
Reference in New Issue
Block a user