- Added endpoints for sending and confirming email verification, enhancing user account security. - Integrated two-factor authentication (2FA) with TOTP support, including enabling, verifying, and disabling 2FA. - Implemented social login functionality for Google and Facebook, allowing users to authenticate using their existing accounts. - Updated dependency injection to include services for email, 2FA, and social login. - Enhanced documentation to reflect new features and usage examples for email verification and 2FA.
29 lines
693 B
C#
29 lines
693 B
C#
using MediatR;
|
|
using StorageService.Domain.AggregatesModel.FileAggregate;
|
|
|
|
namespace StorageService.API.Application.Commands;
|
|
|
|
/// <summary>
|
|
/// EN: Command to upload a file.
|
|
/// VI: Command để upload file.
|
|
/// </summary>
|
|
public record UploadFileCommand(
|
|
Stream FileStream,
|
|
string FileName,
|
|
string ContentType,
|
|
long FileSizeBytes,
|
|
string UserId,
|
|
string? TenantId = null,
|
|
FileAccessLevel AccessLevel = FileAccessLevel.Private
|
|
) : IRequest<UploadFileResult>;
|
|
|
|
/// <summary>
|
|
/// EN: Result of file upload.
|
|
/// VI: Kết quả upload file.
|
|
/// </summary>
|
|
public record UploadFileResult(
|
|
bool Success,
|
|
Guid? FileId,
|
|
string? ObjectKey,
|
|
string? Error);
|