Changes for page Attachments

Last modified by Thomas Mortagne on 2023/10/10

<
From version < 39.1 >
edited by Thomas Mortagne
on 2019/04/04
To version < 41.1 >
edited by Thomas Mortagne
on 2019/05/20
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -42,7 +42,7 @@
42 42  
43 43  XWiki offers plugin attachment storage mechanisms so you can store your attachments in the database or directly in the filesystem.
44 44  
45 -No matter what type of attachment store you use, the meta-data for the attachment will be saved in the [[xwikiattachment>>platform:DevGuide.DsXWikiAttachment]] table for faster loads.
45 +Generally metadata for attachment and deleted attachments stay in the database whatever store is used for the content. The metadata contains the type of store used for the content allowing each attachment to choose a different store. The consequence is that what you configure is the **default** store for a new attachment and not the store used for all attachments.
46 46  
47 47  == Filesystem Attachment Store ==
48 48  
... ... @@ -54,7 +54,7 @@
54 54  
55 55  === Filesystem attachment store location ===
56 56  
57 -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.
57 +By default the filsystem storage is located in a sub-folder (##store/file## since XWiki 11.0 and ##storage## before) of the permanent directory (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.
58 58  
59 59  For example:
60 60  
... ... @@ -62,6 +62,12 @@
62 62  environment.permanentDirectory=/opt/tomcat6/data
63 63  {{/code}}
64 64  
65 +Since 11.4 it's possible to set the location of the filesystem store without modifying the general permanent directory using property ##store.file.directory## of the file ##xwiki.properties##.
66 +
67 +{{code}}
68 +store.file.directory=/my/custom/location
69 +{{/code}}
70 +
65 65  === Other considerations ===
66 66  
67 67  If you are running a [[cluster>>Documentation.AdminGuide.Clustering.WebHome]] you will need to have a synchronized storage directory for each node. You can use NFS or other means to mount the disk on each node in the cluster.

Get Connected