mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
Add PhotoUpload feature for uploading photos to file storage
Adds UploadPhotoCommand/Handler/Validator and PhotoUploadRepository, invoked via MediatR by other features' commands (e.g. a future CreateBreweryPhoto) rather than exposed through its own controller. Wires the feature and IFileStorageProvider into API.Core.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Features.ImageUploads.Commands.UploadPhoto;
|
||||
|
||||
/// <summary>
|
||||
/// Uploads a new photo to storage under <c>{Key}/{generated photo id}</c> and records it. Sent by
|
||||
/// other features' handlers (e.g. a brewery photo upload command) rather than bound from a request
|
||||
/// directly, since this feature exposes no controller of its own.
|
||||
/// </summary>
|
||||
public record UploadPhotoCommand(Guid UploadedById, string Key, IFormFile File) : IRequest<Guid>;
|
||||
Reference in New Issue
Block a user