Actions
Defect #26398
closedUnable to upload attachments
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
Hi,
We just upgraded from a 3.3.0 install and we found this in the logs when uploading attachments:
Started POST "/uploads.js?attachment_id=1&filename=Nouveau%20document%20texte.txt&content_type=text%2Fplain" for **ANON** at 2017-07-10 10:55:02 +0200 Processing by AttachmentsController#upload as JS Parameters: {"attachment_id"=>"1", "filename"=>"Nouveau document texte.txt", "content_type"=>"text/plain"} Current user: **ANON** (id=7) Saving attachment '/srv/www/redmine-3.4.1/files/2017/07/170710105502_6790b8cc76837a645a85dd36cf99e75f.txt' (0 bytes) Completed 500 Internal Server Error in 15ms (ActiveRecord: 2.3ms) ActiveRecord::StatementInvalid (Mysql2::Error: Data too long for column 'digest' at row 1: INSERT INTO `attachments` (`author_id`, `filename`, `content_type`, `created_on`, `disk_directory`, `disk_filename`, `digest`) VALUES (7, 'Nouveau document texte.txt', 'text/plain', '2017-07-10 10:55:02', '2017/07', '170710105502_6790b8cc76837a645a85dd36cf99e75f.txt', 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')): app/controllers/attachments_controller.rb:97:in `upload' lib/redmine/sudo_mode.rb:63:in `sudo_mode'
A quickfix is to add this to database.yml:
strict: false
But a better fix would probably be to change the table structure in the DB.
(maybe I missed an upgrade script, but I didn't find any)
Actions