feat: enhance thumbnail generation with category support and update storage paths
This commit is contained in:
@@ -106,7 +106,8 @@ public class SendMessageCommandHandler : IBaseCommandHandler<SendMessageCommand,
|
||||
uploadedFile.SetImageDimensions(dimensions.Value.Width, dimensions.Value.Height);
|
||||
}
|
||||
|
||||
var thumbnail = await _thumbnailService.GenerateImageThumbnailAsync(uploadResult.StoragePath);
|
||||
var thumbnail = await _thumbnailService
|
||||
.GenerateImageThumbnailAsync(uploadResult.StoragePath, category: "TaskChatMessage");
|
||||
if (thumbnail.HasValue)
|
||||
{
|
||||
uploadedFile.SetThumbnail(thumbnail.Value.ThumbnailUrl);
|
||||
|
||||
@@ -9,15 +9,17 @@ public interface IThumbnailGeneratorService
|
||||
/// تولید thumbnail برای تصویر
|
||||
/// </summary>
|
||||
Task<(string ThumbnailPath, string ThumbnailUrl)?> GenerateImageThumbnailAsync(
|
||||
string imagePath,
|
||||
int width = 200,
|
||||
string imagePath,
|
||||
string category,
|
||||
int width = 200,
|
||||
int height = 200);
|
||||
|
||||
/// <summary>
|
||||
/// تولید thumbnail برای ویدیو
|
||||
/// </summary>
|
||||
Task<(string ThumbnailPath, string ThumbnailUrl)?> GenerateVideoThumbnailAsync(
|
||||
string videoPath);
|
||||
string videoPath,
|
||||
string category);
|
||||
|
||||
/// <summary>
|
||||
/// حذف thumbnail
|
||||
|
||||
Reference in New Issue
Block a user