File name size limit and original_file_name field

We are using OJS version 3.1.1.2.

When an author made an upload, he got stuck with this page:

Tela_Revista_Portuguesa_de_Educa%C3%A7%C3%A3o

Analyzing the logs, we found that there was an error related with the size of the field that stores the name of the file - original_file_name. The file has several underscores “_” and no whitespaces. And is bigger than 127 chars, which is the limit for the field in the data base:

[DATE] [:error] [PID] [client IP_ADDR] ojs2: DB Error: Data too long for column 'original_file_name' at row 1, referer: https://example.com//submission/wizard/2?submissionId=SUBMISSION_NUMBER

We’ve asked the author to change the file name, but OJS should provide mechanisms to handle this problem, like visual feedback with the error for the user.

Hi,
I second that.
Faced the very same problem right now. Shortened filename and that’s it.
Regards,
Juan

Hi, Please check if you have the Php Fileinfo module installed. Other users have solved the problem with this.


Dago