Welcome Guest, Not a member yet? Register   Sign In
[VALIDATION] - Upload excel fail
#4

(This post was last modified: 11-03-2024, 08:50 PM by ddevsr.)

I found problem is getMimeType(), the function give mime type application/encrypted. I think because it was passworded and reopened.

Already test in CI4 base code and my project
PHP Code:
vendor/bin/phpunit tests/system/Validation/FileRulesTest.php
PHPUnit 11.4.3 by Sebastian Bergmann 
and contributors.

Runtime:      PHP 8.3.13 with Xdebug 3.3.2
Configuration
D:\Project\laragon\www\ci4\phpunit.xml.dist

FF
┌──────────────────────────────────────────────────────────────────────────────┐
│ $file
->getMimeType()                                                        │
└──────────────────────────────────────────────────────────────────────────────┘
string 
(19"application/encrypted"
┌──────────────────────────────────────────────────────────────────────────────┐
│ $file
->getClientExtension()                                                  │
└──────────────────────────────────────────────────────────────────────────────┘
string 
(3"xls"
┌──────────────────────────────────────────────────────────────────────────────┐
│ $file
->guessExtension()                                                      │
└──────────────────────────────────────────────────────────────────────────────┘
string 
(0""
┌──────────────────────────────────────────────────────────────────────────────┐
│ $params                                                                      │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
    0 => string (3"xls"
    1 => string (4"xlsx"
]
════════════════════════════════════════════════════════════════════════════════
Called from 
<ROOT>/system/Validation/FileRules.php:210 [dd()] 
Reply


Messages In This Thread
[VALIDATION] - Upload excel fail - by ddevsr - 10-31-2024, 02:57 AM
RE: [VALIDATION] - Upload excel fail - by ddevsr - 11-01-2024, 05:07 PM
RE: [VALIDATION] - Upload excel fail - by ddevsr - 11-03-2024, 07:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB