Files
grow-api/src/uploader/dto/upload-response.dto.ts
T
2026-07-06 14:46:48 +03:30

26 lines
585 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
export class UploadFileResponseDto {
@ApiProperty({ example: 'uploads/2026/07/uuid-photo.jpg' })
key: string;
@ApiProperty({
example: 'https://c274938.parspack.net/uploads/2026/07/uuid-photo.jpg',
})
url: string;
@ApiProperty({ example: 'photo.jpg' })
originalName: string;
@ApiProperty({ example: 'image/jpeg' })
mimeType: string;
@ApiProperty({ example: 102400 })
size: number;
}
export class MultiUploadResponseDto {
@ApiProperty({ type: [UploadFileResponseDto] })
files: UploadFileResponseDto[];
}