Project

General

Profile

Redmine 2.5.1 : attached file not displayed

Added by Claude Durocher almost 10 years ago

I'm trying to attach files to either issues or documents and everything seems to work fine (I select the file and hit Save) and the file is saved on the server (in the files subdir) but the attached file is never shown with the document it was attached to.

Any suggestions?

log :


Started POST "/documents/1/add_attachment" for 10.10.10.2 at 2014-05-21 16:30:53 -0400
Processing by DocumentsController#add_attachment as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"svbz9kVQGfmZ8fa8BIEe70AQhRunNnaB3qEIGO6k7Y4=", "attachments"=>{"1"=>{"filename"=>"alfresco-fix.txt", "description"=>"xxx"}}, "commit"=>"Ajouter", "id"=>"1"}
  Current user: admin (id=1)
Redirected to http://redmine.test.com/documents/1
Completed 302 Found in 4.4ms (ActiveRecord: 0.3ms)
Started GET "/documents/1" for 10.10.10.2 at 2014-05-21 16:30:53 -0400
Processing by DocumentsController#show as HTML
  Parameters: {"id"=>"1"}
  Current user: admin (id=1)
  Rendered attachments/_form.html.erb (59.9ms)
  Rendered documents/show.html.erb within layouts/base (63.1ms)
  Rendered plugins/redmine_backlogs/app/views/hooks/_rb_include_scripts.html.erb (2.2ms)
Completed 200 OK in 102.3ms (Views: 95.1ms | ActiveRecord: 2.8ms)
Started GET "/rb/server_variables.js" for 10.10.10.2 at 2014-05-21 16:30:54 -0400
Processing by RbServerVariablesController#index as JS
  Current user: admin (id=1)
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:erb] instead. (called from realtime at /usr/lib/ruby/1.9.1/benchmark.rb:295)
  Rendered plugins/redmine_backlogs/app/views/rb_server_variables/show.js.erb (2.3ms)
Completed 200 OK in 4.6ms (Views: 2.8ms | ActiveRecord: 0.1ms)
Started GET "/documents/1" for 10.10.10.2 at 2014-05-21 16:31:06 -0400
Processing by DocumentsController#show as HTML
  Parameters: {"id"=>"1"}
  Current user: admin (id=1)
  Rendered attachments/_form.html.erb (1.2ms)
  Rendered documents/show.html.erb within layouts/base (4.3ms)
  Rendered plugins/redmine_backlogs/app/views/hooks/_rb_include_scripts.html.erb (2.1ms)
Completed 200 OK in 42.6ms (Views: 35.6ms | ActiveRecord: 2.6ms)
Started GET "/admin" for 10.10.10.2 at 2014-05-21 16:31:58 -0400
Processing by AdminController#index as HTML
  Current user: admin (id=1)
  Rendered admin/_menu.html.erb (3.3ms)
  Rendered admin/index.html.erb within layouts/admin (4.9ms)
  Rendered plugins/redmine_backlogs/app/views/hooks/_rb_include_scripts.html.erb (2.2ms)
  Rendered layouts/base.html.erb (20.8ms)
Completed 200 OK in 31.6ms (Views: 27.7ms | ActiveRecord: 1.6ms)
Started GET "/rb/server_variables.js" for 10.10.10.2 at 2014-05-21 16:31:58 -0400
Processing by RbServerVariablesController#index as JS
  Current user: admin (id=1)
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:erb] instead. (called from realtime at /usr/lib/ruby/1.9.1/benchmark.rb:295)
  Rendered plugins/redmine_backlogs/app/views/rb_server_variables/show.js.erb (2.5ms)
Completed 200 OK in 4.7ms (Views: 3.0ms | ActiveRecord: 0.1ms)


Replies (3)

RE: Redmine 2.5.1 : attached file not displayed - Added by Claude Durocher almost 10 years ago

It seems like some fileds in the DB (container_id, container_type) are not inserted correctly:


mysql> SELECT `attachments`.* FROM `attachments` ORDER BY attachments.created_on ASC, attachments.id ASC;

+----+--------------+----------------+----------------------------------+-----------------------------------------------+----------+--------------+----------------------------------+-----------+-----------+---------------------+-------------+----------------+
| id | container_id | container_type | filename                         | disk_filename                                 | filesize | content_type | digest                           | downloads | author_id | created_on          | description | disk_directory |
+----+--------------+----------------+----------------------------------+-----------------------------------------------+----------+--------------+----------------------------------+-----------+-----------+---------------------+-------------+----------------+
|  1 |            5 | Project        | xrdp-chansrv.log                 | 140204180621_xrdp-chansrv.log                 |       68 | NULL         | 4b32ae4910a6f00a80cfbd057fb47dda |         1 |         3 | 2014-02-04 18:06:21 |             | 2014/02        |
|  2 |         NULL | NULL           | 909338d9210f9b619aa0babafaa922bb | 140430132425_909338d9210f9b619aa0babafaa922bb |    20073 |              | e377bd0f2d75d83f19094a278ecc2ad6 |         0 |         1 | 2014-04-30 13:24:25 | NULL        | 2014/04        |
|  3 |         NULL | NULL           | e006b4399a53bbaf8793983b2e181960 | 140521162824_e006b4399a53bbaf8793983b2e181960 |   730437 |              | f2bef0e957d32858a042d21ad9a83a60 |         0 |         1 | 2014-05-21 16:28:24 | NULL        | 2014/05        |

RE: Redmine 2.5.1 : attached file not displayed - Added by Claude Durocher almost 10 years ago

We found the problem : our reverse proxy proxy server was misconfigured.

RE: Redmine 2.5.1 : attached file not displayed - Added by Andrew Kohlsmith about 8 years ago

It'd be great if you posted more details. I'm having the same issue but have no reverse proxy in place. I'm suspecting a plugin. Redmine 2.6.6 here.

    (1-3/3)