From 1316215f1a31a61e5e2fff5eff0d6bbad5fab74d Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 2 Feb 2023 14:10:24 +0100 Subject: [PATCH] ZUGFeRDRESTService: Switch to different file size check --- .../ZUGFeRDRESTService/Controllers/ValidationController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs b/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs index e186c6fc..e2cec04a 100644 --- a/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs +++ b/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs @@ -84,7 +84,8 @@ namespace ZUGFeRDRESTService.Controllers { _logger.Info("Checking Filesize of file [{0}]", file.FileName); - bool oFileSizeIsOK = _file.TestFileSizeIsLessThanMaxFileSize(file.FileName, _MaxFileSizeInMegabytes); + long maxFileSize = _MaxFileSizeInMegabytes * 1024 * 1024; + bool oFileSizeIsOK = file.Length < maxFileSize; if (oFileSizeIsOK == false) {