mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-03-10 19:22:50 -04:00
When uploading item images with filenames containing spaces, the thumbnails fail to load due to Apache mod_rewrite rejecting URLs with spaces. Changes: - Modified upload_image() method to sanitize filenames by replacing spaces and special characters with underscores - Uses regex to keep only alphanumeric, underscores, hyphens, and periods - Preserves original filename in 'orig_name' field for reference - Fixes issue where thumbnail URLs would fail with 'AH10411: Rewritten query string contains control characters or spaces' Example: 'banana marsmellow.jpg' becomes 'banana_marsmellow.jpg' Fixes: #4372
56 KiB
56 KiB