From 13f7095b5a163536b31bccaaea89de14daaec93c Mon Sep 17 00:00:00 2001 From: Ibrahim BinAlshikh Date: Mon, 15 Apr 2024 16:26:56 +0300 Subject: [PATCH] fix: Fix to Setting Size of Test Upload File --- webfiori/http/APITestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webfiori/http/APITestCase.php b/webfiori/http/APITestCase.php index 6344aa5..3b4e098 100644 --- a/webfiori/http/APITestCase.php +++ b/webfiori/http/APITestCase.php @@ -47,7 +47,7 @@ public function addFile(string $fileIdx, string $filePath, bool $reset = false) $_FILES[$fileIdx]['name'][] = $info['name']; $_FILES[$fileIdx]['type'][] = mime_content_type($path); - $_FILES[$fileIdx]['size'][] = filesize($this->getAbsolutePath()); + $_FILES[$fileIdx]['size'][] = filesize($path); $_FILES[$fileIdx]['tmp_name'][] = $path; $_FILES[$fileIdx]['error'][] = 0; }