fixes extensions handling by removing dots

This commit is contained in:
Philipp Häfelfinger 2022-11-19 10:05:39 +01:00
parent 074da8a4d8
commit 3b2384d82f
1 changed files with 1 additions and 1 deletions

View File

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