From 93c7c372830b5a7fdafa424b3208ac3ad0876536 Mon Sep 17 00:00:00 2001 From: XShine555 Date: Fri, 20 Mar 2026 01:36:22 +0100 Subject: [PATCH] Missing if --- Infrastructure/Storage/StorageHandler.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Infrastructure/Storage/StorageHandler.cs b/Infrastructure/Storage/StorageHandler.cs index c324220..a7b9e28 100644 --- a/Infrastructure/Storage/StorageHandler.cs +++ b/Infrastructure/Storage/StorageHandler.cs @@ -5,10 +5,11 @@ using Ardalis.Result; using Microsoft.Extensions.Logging; using Musify.Application.Contracts.Infrastructure; using Musify.Domain.Entities; +using Musify.Infrastructure.Configuration; namespace Musify.Infrastructure.Storage { - public class StorageHandler(IDatabase database, IAmazonS3 amazonS3, ILogger logger) + public class StorageHandler(IDatabase database, IAmazonS3 amazonS3, StorageClientConfiguration storageClientConfiguration, ILogger logger) : IStorageHandler { public async Task> GetFileAsync(string bucketName, string keyName, CancellationToken cancellationToken) @@ -42,7 +43,7 @@ namespace Musify.Infrastructure.Storage BucketName = bucketName, Key = keyName, Expires = DateTime.UtcNow + expirationTime, - Protocol = Protocol.HTTP + Protocol = storageClientConfiguration.UseHttp ? Protocol.HTTP : Protocol.HTTPS }; logger.LogDebug("Getting pre-signed URL from S3 with bucket name {BucketName} and key name {KeyName}", bucketName, keyName);