Add MediaService

This service is responsible for operations regarding uploaded media. It should perform save, get and delete operations with the configured backend.
The service also checks, if the mime type of the uploaded media is allowed.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-10-16 22:35:53 +02:00
parent f3e093c715
commit 7a6c06d068
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
5 changed files with 109 additions and 1 deletions

View file

@ -1,8 +1,13 @@
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { NotesModule } from '../notes/notes.module';
import { UsersModule } from '../users/users.module';
import { MediaUpload } from './media-upload.entity';
import { MediaService } from './media.service';
@Module({
imports: [TypeOrmModule.forFeature([MediaUpload])],
imports: [TypeOrmModule.forFeature([MediaUpload]), NotesModule, UsersModule],
providers: [MediaService],
exports: [MediaService],
})
export class MediaModule {}