Top Menu

Jump to content
    Global modules

    Global modules

    • Home
    • Projects
    • Activity
    • Work packages
    • Gantt charts
    • Calendars
    • Team planners
    • Boards
    • News
    Home
    Home
Help
    Getting started
    • Introduction video
  • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support
  • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation

User menu

Sign in
Forgot your password?

or sign in with your existing account

OpenProject ID Google

Side Menu

Collapse project menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Expand project menu
General discussion
  1. OpenProject Community
  2. OpenProject
  3. Forums
  4. General discussion
  5. [SOLVED] OpenProject 3.0: attachments not downloading correctly

[SOLVED] OpenProject 3.0: attachments not downloading correctly

Added by David Brunell over 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

Loading...