A question regarding attachment storage and environment.permanentDirectory
I have a request for my new xwiki: please store attachments as files rather than in the DB.
OK, I found the instructions at: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments I set these:
xwiki.store.attachment.hint = file
xwiki.store.attachment.versioning.hint = file
xwiki.store.attachment.recyclebin.hint = file
I don't have any attachments yet so think I don't need to run the Filesystem Attachment Porter.
My question is regarding this bit of advice:
The directory in which the attachments are stored in the filesystem is defined with the parameter environment.permanentDirectory in the xwiki.properties file. By default it's defined to be data, which is a directory relative to where the Java Servlet Container was started. It's recommend to modify this value to be absolute sure that you can start the Servlet Container from any directory and still have XWiki find the attachments located in this work directory.
OK. My questions are:
- The comment above that variable in xwiki.properties says:
#-# Note if the system property xwiki.data.dir is set then this property is not used.
OK, so it's not quite that simple, I will also need to set xwiki.data.dir. I don't see it occurring anywhere in any file other than in that comment, so I guess I'm not using it, and setting environment.PermanentDirectory won't take effect unless I do.
But wait a sec: I thought this var WAS setting the location of "the data directory". So:
1. What is the difference between them? Between xwiki.data.dir and environment.PermanentDirectory ?
2. Should I do this? I don't have any motivation to do so other than the warning above, which I do not understand. How/why does moving the data dir allow one to start the servlet container from any directory and still have XWiki find the attachments?
The information contained in this transmission may contain West Marine proprietary, confidential and/or privileged
information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are
hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited.
If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original
message. To reply to our email administrator directly, please send an email to [hidden email].