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) {