Hello all,
I have been looking for a way to store attachments (the binary 'content'
data only) as regular files on the servers filesystem. I already read
through the archives and found out so far that this is possible via writing
my own implementation of the
com.xpn.xwiki.store.XWikiAttachmentStoreInterface and then set have them
used via settings in xwiki.cfg. (see this thread in the markmail archives:
http://markmail.org/message/zyd2tpfj2x45hyxt )
What I do is just taking out the XWikiAttachmentContent content property's
byte[], stream it into a file and replace the property value with the path
to this file. so I need no changes to the hibernate mappings etc. ... and
when reading it in, doing a file read accordingly ...
So I store everything as usual with Hibernate, just the pure content is
stored as file (with an unique id embedded in the filename)
Q1) ... any better idea? (its working fine so far ;o)
Q2) I am looking for a way to set the store implementations on a per-space
basis.
Or: How can the store implementation see to which space the attachment's
parent page belongs and read in any config (string) for this space?
Q3) Any other Interfaces I should provide a filesystem based implemention
for? So far it seems I dont need to make any changes to the Recyclebin and
Versioning store implementations.
Q4) Is there a way to turn off caching for attachments only? I turned off
caching totally with
xwiki.store.cache=0
xwiki.store.cache.capacity=0
and this is a performance nightmare. But I need to turn off only the caching
of attachments. Is this possible?
Thank you in advance for any bit of input ;o)
Michael
--
View this message in context:
http://www.nabble.com/AttachmentStore---my-filesystem-based-implementation-…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.