From 3b2384d82f9d2139d5efbca915ab0955bbe02b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=A4felfinger?= Date: Sat, 19 Nov 2022 10:05:39 +0100 Subject: [PATCH] fixes extensions handling by removing dots --- src/Piwigo.Client/PiwigoClientExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Piwigo.Client/PiwigoClientExtensions.cs b/src/Piwigo.Client/PiwigoClientExtensions.cs index d0265c0..a3e48c3 100644 --- a/src/Piwigo.Client/PiwigoClientExtensions.cs +++ b/src/Piwigo.Client/PiwigoClientExtensions.cs @@ -51,7 +51,7 @@ public static class PiwigoClientExtensions } var supportedFileTypes = await client.Session.GetSupportedFileTypes(cancellationToken); - if (!supportedFileTypes.Contains(imageToUpload.Extension.ToLower())) + if (!supportedFileTypes.Contains(imageToUpload.Extension.Replace(".", string.Empty).ToLower())) { throw new PiwigoException( $"The file {imageToUpload.Name} has extension {imageToUpload.Extension} which is not supported by the connected piwigo server. Please use one of the following formats {string.Join(",", supportedFileTypes)}");