[Rt-devel] Storing of attachments.

J. Sloan js138 at eng.cam.ac.uk
Mon Oct 25 15:15:42 EDT 2004

This isn't a new idea, but I've not seen anyone talking about it recently 
on the lists, so it may be new to RT.

Some attachment types (gif,jpeg) aren't really all that useful for search 
purposes in the database.  Also very large attachments tend to be painful.

What I'm looking for is a way to store these on disc outside of the 
database itself.

What comes to mind is a mechanism where appropriate attachments just get 
saved into a filesystem accessible to the webserver.  These can then be 
referenced direct from disc by ShowTransaction.

I've not fully thought through the pros and cons - quickly I can see:


1.  Database doesn't grow as quickly.
2.  Attachments on disc can be purged more simply.


1.  Attachments aren't (easily) searchable.

Some care needs to be taken as to how they are stored on disc, which a DB 
would do for you.

Implementationwise, I can see adding various attachment 'types' (possibly 
by introducting pseudo-mime types) for an attachment on disc, an 
attachment which has been dropped/deleted.  Possibly more.   I can also 
see allowing for attachments to be deleted via the gui.  This would be 
useful for the more unpleasant forms of spam which pass through our spam 
filters - really don't want that sort of thing clogging up our DB!

Has anyone looked down this sort of line of development before?  And if 
not, any comments before I do so myself?



More information about the Rt-devel mailing list