Files
wiki-server/src/modules/image/image.controller.ts
T
dahyeon 6aec3e91b8 Feat: Implement image upload and refine API infrastructure
Introduces a new `ImageModule` to handle image uploads, utilizing Minio for object storage and NATS for triggering asynchronous derivative generation workflows.

Enhances the NATS client with improved connection reliability, graceful shutdown, and a simplified `publish` method for outgoing messages.

Refines JWT verification for Microsoft Entra ID, including robust JWKS handling, better type safety for claims, and improved error logging to ensure secure authentication.

Updates Swagger documentation with the API server URL and Bearer (OpenID Connect) authentication scheme for better discoverability and easier client integration.

Enables global CORS to allow cross-origin requests to the API.

Adds `minio`, `temporal-polyfill`, and `@types/multer` dependencies to support these new functionalities.
2025-11-09 14:50:24 +00:00

15 lines
478 B
TypeScript

import { Controller, Post, UploadedFile, UseInterceptors } from '@nestjs/common';
import { ImageService } from './image.service';
import { FileInterceptor } from '@nestjs/platform-express';
@Controller('image')
export class ImageController {
constructor(private readonly imageService: ImageService) {}
@Post()
@UseInterceptors(FileInterceptor('file'))
async uploadImage(@UploadedFile() file: Express.Multer.File) {
return this.imageService.uploadImage(file)
}
}