From 7976854190d5550abeeab03abee90495692950fe Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 1 May 2024 01:20:08 +0200 Subject: [PATCH] [backend/drive] Correctly set thumbnail & webpublicUrl when using the local storage provider --- Iceshrimp.Backend/Core/Services/DriveService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Iceshrimp.Backend/Core/Services/DriveService.cs b/Iceshrimp.Backend/Core/Services/DriveService.cs index f43b5a3f..e654e677 100644 --- a/Iceshrimp.Backend/Core/Services/DriveService.cs +++ b/Iceshrimp.Backend/Core/Services/DriveService.cs @@ -246,6 +246,7 @@ public class DriveService( await using var thumbWriter = File.OpenWrite(thumbPath); await thumbnail.CopyToAsync(thumbWriter); await thumbnail.DisposeAsync(); + thumbnailUrl = $"https://{instanceConfig.Value.WebDomain}/files/{thumbnailFilename}"; } if (webpublicFilename != null && webpublic is { Length: > 0 }) @@ -254,6 +255,7 @@ public class DriveService( await using var webpWriter = File.OpenWrite(webpPath); await webpublic.CopyToAsync(webpWriter); await webpublic.DisposeAsync(); + webpublicUrl = $"https://{instanceConfig.Value.WebDomain}/files/{webpublicFilename}"; } } else