diff --git a/apps/backend/src/app/files/files.controller.ts b/apps/backend/src/app/files/files.controller.ts index 5f699f7..2f8b5b3 100644 --- a/apps/backend/src/app/files/files.controller.ts +++ b/apps/backend/src/app/files/files.controller.ts @@ -1,16 +1,19 @@ -import { Controller, Get, Param, StreamableFile } from '@nestjs/common'; +import { Controller, Get, Param, Post, StreamableFile } from '@nestjs/common'; import { FilesService } from "./files.service"; @Controller("files") export class FilesController { constructor(private readonly filesService: FilesService) {} - //TODO the file name, replace spaces to underscore and deliver it via the response + //TODO POST FILE + @Post('new') + async saveFile() { + + } + @Get(':fileId') async getFile(@Param('fileId') fileId: string) { return this.filesService.get(fileId); } - //TODO POST FILE - } diff --git a/apps/backend/src/app/files/files.service.ts b/apps/backend/src/app/files/files.service.ts index 0e326b1..25d7ca2 100644 --- a/apps/backend/src/app/files/files.service.ts +++ b/apps/backend/src/app/files/files.service.ts @@ -54,4 +54,11 @@ export class FilesService { disposition: `attachment; filename="${fileNameWithoutSpaces}.${fileInformation.fileType.ext.toLowerCase()}"` }); } + + //TODO list the files + + //TODO save a file + public async set() { + + } }