Content
[SOLVED] OpenProject 3.0: attachments not downloading correctly
Added by David Brunell almost 11 years ago
Hello,
I’m running version 3.0, retrieved from github on 25 Feb. Server OS is Ubuntu 14.04LTS, 24 Feb. daily build, Mysql 5.5, Apache 2.4.7, Ruby 2.1.0, Rails 3.2.17. I can make attachments to Work Packages or the Wiki, but when I later try to download the attachments, I get zero-length files. When I look at the attachments table in mysql>, the records are getting properly added with correct filename and filesize. However, I confess a certain ignorance of how these files are actually getting stored on the server. Can you provide any suggestions for troubleshooting?
Kind regards,
David
Edit: So I’ve located the attachments in the files subdirectory of the Rails app. If I retrieve these files from the server using FTP, they download and open just fine.
The log doesn’t seem to show anything unusual:
Started GET "/attachments/6/20140303103807004_0001.pdf" for 192.168.1.1 at 2014-03-03 13:35:32 -0600 Processing by AttachmentsController#show as HTML Parameters: {"id"=>"6", "filename"=>"20140303103807004_0001.pdf"} Sent file /home/openproject/openproject/files/140303112032_20140303103807004_0001.pdf (0.1ms) Completed 200 OK in 17.1ms (ActiveRecord: 2.3ms)
Edit2: I failed to install and properly configure Apache XSendFile. Added the following lines to the virtual host configuration file. Works now.
XSendFile On XSendFilePath /home/openproject/openproject/files