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)}");