Files
dolibarr/htdocs
Gigarun ingénierie f837fb4fa8 Fix: Correct unit comparison bug in webportal document download (#36256)
The file size check was comparing bytes (from dol_filesize) directly with
kilobytes (from MAIN_SECURITY_MAXFILESIZE_DOWNLOADED config), causing false
positives that blocked downloads of small files.

Example: A 94 KB file (96678 bytes) was rejected because 96678 > 20480,
even though the limit was actually 20480 KB (20 MB).

Changes:
- Convert KB limit to bytes before comparison: $fileSizeMax * 1024
- Improve error message to display file size in KB for consistency
- Add detailed logging with both bytes and KB values

Fixes: Files under the configured limit are now correctly allowed to download
2025-11-14 16:05:18 +01:00
..
Doc
2025-11-12 19:45:09 +01:00
2025-11-14 11:47:05 +01:00
2025-11-14 15:38:37 +01:00
2025-11-12 15:29:42 +01:00
2025-11-14 11:47:05 +01:00
2025-11-13 12:31:06 +01:00
2025-11-09 12:43:04 +01:00
2025-11-11 19:31:18 +01:00
2025-11-14 12:02:16 +01:00