Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • 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
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

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

Content

Development
  1. OpenProject
  2. Forums
  3. Development
  4. Handling attachments as external URLs

Handling attachments as external URLs

Added by Jerome C over 8 years ago

Hello,
I was having a discussion with ‘support’ regarding attachments.

The problem is that any attachment added to a task is a second version, the first being handled by a document management system/tool/protocol (which OpenProject should not substitute). As the document could be dynamic in nature, this forces a manual update of TWO object. Major source of errors…. 10-foot pole type of situation…

I was told ‘well it’s not on the roadmap, but since it is open source…’ So I cloned the most recent dev release and started exploring. The solutions that appear evident to me are apparently already there:
• AttachmentsController has an action method with `url = @attachment.external_url`
• class Attachment defines method `external_url`
• the documentation at `https://github.com/opf/openproject/blob/dev/doc/CONFIGURATION.md#attachments-storage` provides the fog parameter setting.

So, how are these not accessible with OpenProject’s hosted service?

I realize there are no views for this functionality (nor have I found any for inputting some some S3 settings). Also the PlanningElementsController create action only contemplates `@planning_element.attach_files(params[:attachments])`

Is there a conscious reason for this?


Replies (2)

RE: Handling attachments as external URLs - Added by Oliver Günther over 8 years ago

Hi Jerome,

we’re using CarrierWave for handling uploads, and by default a FileUploader is used to store your attachments locally.

You can define a S3 bucket for uploading files instead by passing fog_credentials, see the documentation from Carrierwave.

These settings are read during the boot of the application in config/initializers/carrierwave.rb.

The method attach_files then creates an attachment model instance which in turn uses the uploader through mount_uploader.

Best,
Oliver

RE: Handling attachments as external URLs - Added by Jerome C over 8 years ago

Yes Oliver,

this is exactly what I was hoping for (I saw the carrierwave initializer in the ce version, not the dev version) and surmised this was an avenue. In addition, we could define a class FileUploader < CarrierWave::Uploader::Base to store the objects in rigorous manner.

However, how could this be applied to an openproject.com hosted solution? I find no UI that alludes to it…

[thank you for quick turnover on comment]

Jerome

  • (1 - 2/2)
Loading...