[rt-devel] RT::Extension::ExternalStorage

Emmanuel Manganneau emanganneau at easter-eggs.com
Fri Aug 21 02:23:45 EDT 2015


Hi,

Le 11/02/2015 17:29, Christian Loos a écrit :
>[...]
> The only annoying thing with this extension is, that even if you have it
> configured to save attachments on disk, it first saves the attachments
> in the DB and you then have to extract them.
> This makes an regular "optimize table rt4.Attachments;" necessary.
> As this operation locks the table (up to MySQL version 5.6.17), you have
> to plan a regularly downtime.
>
> Maybe you can introduce an option to save the attachments directly on disk.


We were looking for the same option, so we developped it.
The goals are :
- store file on disk,
- reuse some files instead of storing them every time,
- create a CF which could propose a list of preloaded files to "attach",
- be able to populate this CF directly from the filesystem (through a 
script)
- etc.

Plus, we wanted to keep as much as possible the way RT was managing files.

The code relies in :
- a sql file, needed to store the references to the filesystem 
(attachments was not relevant due to transactionid and to keep most of 
RT's code)
- Document.pm , a class inheriting from Record,
- some minor changes to Attachment.pm and CustomField.pm,
- some minor changes to share/html/Ticket/Attachment/dhandler
- some minor changes to share/html/Download/CustomFieldValue/dhandler

The db used is postgresql, but I think it would be easy to port to mysql.

Let me know if you are interested.

This is a work in developpment : no responsability for production 
environment :)

-- 
Easter-eggs                              Spécialiste GNU/Linux
44-46 rue de l'Ouest  -  75014 Paris  -  France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37    -   Fax: +33 (0) 1 43 35 00 76
emanganneau at easter-eggs.com     -   http://www.easter-eggs.com


More information about the rt-devel mailing list