feat: Implement file upload functionality with MinIO integration

- Added new dependencies for HMAC, hex, and urlencoding in Cargo.toml.
- Introduced FileUploadSchema for handling multipart file uploads.
- Enhanced UsersService with upload_file method to handle file uploads to MinIO.
- Implemented MinioService for managing MinIO interactions, including file uploads and presigned URL generation.
- Updated environment configuration to include MinIO region and secure settings.
- Added validation for file types and sizes during upload.
- Improved error handling and logging for file upload processes.
- Created utility functions for base64 decoding and content type extraction.
This commit is contained in:
MythEclipse
2025-08-14 16:53:14 +07:00
parent bbff555a06
commit 874986f1d6
9 changed files with 641 additions and 510 deletions
+2
View File
@@ -29,6 +29,7 @@ use imphnen_iam::{
RolesRequestUpdateDto, TokenDto, UsersCreateRequestDto, UsersDetailItemDto,
UsersListItemDto, UsersUpdateRequestDto, auth, permissions, roles, users,
};
use imphnen_iam::users::users_controller::FileUploadSchema;
use utoipa::{
Modify, OpenApi,
openapi::security::{Http, HttpAuthScheme, SecurityScheme},
@@ -115,6 +116,7 @@ use utoipa::{
UsersListItemDto,
UsersUpdateRequestDto,
UsersCreateRequestDto,
FileUploadSchema,
GachaClaimItemDto,
GachaClaimRequestDto,
GachaItemDto,