mirror of
https://github.com/docmost/docmost.git
synced 2025-11-22 10:31:09 +10:00
more work on attachments
* fix frontend env usage
This commit is contained in:
7
apps/server/src/core/attachment/dto/get-file.dto.ts
Normal file
7
apps/server/src/core/attachment/dto/get-file.dto.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class GetFileDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
attachmentId: string;
|
||||
}
|
||||
20
apps/server/src/core/attachment/dto/upload-file.dto.ts
Normal file
20
apps/server/src/core/attachment/dto/upload-file.dto.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import {
|
||||
IsDefined,
|
||||
IsNotEmpty,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
} from 'class-validator';
|
||||
|
||||
export class UploadFileDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
attachmentType: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
pageId: string;
|
||||
|
||||
@IsDefined()
|
||||
file: any;
|
||||
}
|
||||
Reference in New Issue
Block a user