• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

Filename length

Status
Not open for further replies.

Barry

💖 Chevereto Fan
I am attempting to upload a file with the following name.

Sherlock_HD_Wallpaper_1080P_clubwallpaper(1).jpg

A handful of the files failed due to the length of the name. What is the max lenght of the filename that can be uploaded, and can it be configured?
 
Here is the exact sql statement

Sherlock_HD_Wallpaper (3).jpg - SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'image_title' at row 1
 
Title is fixed to 100 chars but problem is when the system gets that title from an invalid Exif description (usually with several unicode chars). For the next update that will be fixed, but for now open app/lib/classes/class.image.php and replace this:
PHP:
            $uploaded_id = self::insert($image_upload, $image_insert_values);

With this:
PHP:
            // Trim image_title
            $image_insert_values['title'] = mb_substr($image_insert_values['title'], 0, 100, 'UTF-8');
           
            $uploaded_id = self::insert($image_upload, $image_insert_values);
 
Status
Not open for further replies.
Back
Top