file uploads for media management (not persisted yet)
This commit is contained in:
@@ -11,10 +11,6 @@ internal static class ServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddZeroMedia(this IServiceCollection services, IConfiguration config)
|
||||
{
|
||||
services.AddScoped<IMediaStore, MediaStore>();
|
||||
services.AddScoped<IMediaCreator, MediaCreator>();
|
||||
services.AddScoped<IMediaManagement, MediaManagement>();
|
||||
|
||||
services.AddSingleton<IMediaFileSystem, MediaFileSystem>(svc =>
|
||||
{
|
||||
IOptions<MediaOptions> options = svc.GetRequiredService<IOptions<MediaOptions>>();
|
||||
@@ -22,6 +18,10 @@ internal static class ServiceCollectionExtensions
|
||||
return new(Path.Combine(env.WebRootPath, options.Value.FolderPath), options.Value.PublicPathPrefix);
|
||||
});
|
||||
|
||||
services.AddScoped<IMediaStore, MediaStore>();
|
||||
services.AddScoped<IMediaCreator, MediaCreator>();
|
||||
services.AddScoped<IMediaManagement, MediaManagement>();
|
||||
|
||||
services.AddOptions<MediaOptions>().Bind(config.GetSection("Zero:Media")).Configure(opts =>
|
||||
{
|
||||
opts.FolderPath = "uploads";
|
||||
|
||||
Reference in New Issue
Block a user