redmine_dmsf icon indicating copy to clipboard operation
redmine_dmsf copied to clipboard

On Line Storage Interface

Open M0d3rn15t opened this issue 6 years ago • 3 comments

This is a feature request based on discussion in issue #842.

With many redmine servers being configured on cloud servers (I have tried them on AWS, Azure and 1 and 1 VPS), where storage is at a premium and can get very expensive, it would be incredibly useful to be able to configure DMSF to store the documents on Online storage facilities like DropBox, Google Drive, OneDrive and Amazon S3 storage.

From my point of view Dropbox would be the highest priority here, and might be the easiest to implement as it could tie in with the dropbox_attach (http://www.redmine.org/plugins/redmine_dropbox_attachments) plugin. The Dropbox Attachment Storage plug in defines the files attachment storage on your dropbox.

Note: the dropbox_attach plugin is currently broken as Dropbox changed their API last year.

M0d3rn15t avatar Mar 24 '18 18:03 M0d3rn15t

I have done some investigation with both the Dropbox attachment storage plugin and the Object Storage plugin I didn't get the Amazon one working (crashed redmine) but spent a bit more time on the Dropbox one.

I finally got the API V2 fork of the plugin to run and connect to Dropbox. https://github.com/bprotas/redmine_dropbox_attachments. Now it connects and might upload file attachments on brand new projects to the dropbox, but it couldn't find the existing files (even when I replicated the 'files' folder on Dropbox, obviously something I am missing.

As far as dmsf goes however, the document went straight to the usual place (redmine/files/dmsf) and ignored dropbox.

Would the use of this plugin make life easier? Or could we leverage the code in the Plugin to give us what we want?

M0d3rn15t avatar May 01 '18 12:05 M0d3rn15t

I haven't looked into the DMSF code (not really Ruby literate yet) but I wouldn't be surprised if DMSF used its own file handling rather than the redmine attachment hooks.

I have got the Dropbox Attachment Storage plugin working properly now and will attempt to get the S3 one working when I have enough free time in my day job and enough spare cash for a Wasabi account.

Is it possible to use the mechanics of the redmine attachment code to leverage the attachment storage plugins already created, or will the storage plugins all have to be modified to incorporate the ability to store dmsf files?

M0d3rn15t avatar Jul 08 '18 17:07 M0d3rn15t

As previously commented, the Dropbox plugin doesn't really give us what we need here.

Although I still think it would be useful the leverage the development effort put in on these plugins I have discovered an alternative which will help in the short term and has other possible advantages.

My solution uses s3fs (fuse) to mount a Wasabi S3 bucket as the redmine 'files' folder. This seems to work well though I have not run it in anger yet.

Fuse offers mount point options for other Cloud storage solutions, e.g. ff4d which can apparently mount dropboxes.If you want to host your own storage there is a fuse extension for seafile (https://manual.seafile.com/extension/fuse.html).

rclone (https://rclone.org/) can use fuse to mount a host of cloud drives.

Note: I have only tried s3fs.

Please comment if you want me to supply more info.

M0d3rn15t avatar Sep 24 '18 09:09 M0d3rn15t