Changes for page Attachments

Last modified by Thomas Mortagne on 2023/10/10

<
From version < 38.1 >
edited by Thomas Mortagne
on 2019/04/04
To version < 40.1 >
edited by Thomas Mortagne
on 2019/04/11
>
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  
... ... @@ -52,21 +52,6 @@
52 52  
53 53  The Filesystem attachment store saves your attachments in files in a directory tree. This means you will have one more thing to do when you back up your data but it also means you can save larger (over one gigabyte) files. Filesystem attachment store implements a two stage commit mechanism to maintain integrity even if the database fails to commit the attachment meta-data.
54 54  
55 -=== Switch to database attachment store ===
56 -
57 -These settings should read as follows:
58 -
59 -{{code language="none"}}
60 -xwiki.store.attachment.hint = hibernate
61 -xwiki.store.attachment.versioning.hint = hibernate
62 -xwiki.store.attachment.recyclebin.content.hint=hibernate
63 -
64 -# If you need to use database store for the attachment it's probably true for deleted attachments
65 -xwiki.store.recyclebin.content.hint = hibernate
66 -{{/code}}
67 -
68 -Also make sure they are not commented out.
69 -
70 70  === Filesystem attachment store location ===
71 71  
72 72  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.
... ... @@ -88,11 +88,26 @@
88 88  == Database Attachment Store ==
89 89  
90 90  {{info}}
91 -The default until 10.2.
76 +The default before 10.5.
92 92  {{/info}}
93 93  
94 94  This attachment storage mechanism stores your attachments in database entries in the [[xwikiattachment_content>>platform:DevGuide.DsXWikiAttachmentContent]], [[xwikiattachment_archive>>platform:DevGuide.XWikiAttachmentArchive]] and [[xwikiattrecyclebin>>platform:DevGuide.DsXwikiRecycleBin]] tables. This system allows for easy backup of your attachments by dumping the database and keeping all of your data together, but attachment size is memory constrained since the attachment content and archive must all be held in memory. As a general rule, attachments larger than 30MB are not possible.
95 95  
81 +=== Switch to database attachment store ===
82 +
83 +These settings should read as follows:
84 +
85 +{{code language="none"}}
86 +xwiki.store.attachment.hint = hibernate
87 +xwiki.store.attachment.versioning.hint = hibernate
88 +xwiki.store.attachment.recyclebin.content.hint=hibernate
89 +
90 +# If you need to use database store for the attachment it's probably true for deleted attachments
91 +xwiki.store.recyclebin.content.hint = hibernate
92 +{{/code}}
93 +
94 +Also make sure they are not commented out.
95 +
96 96  {{info}}
97 97  When using this attachment store with a MySQL database, you must set the ##max_allowed_packet## to about 3 times the size of your largest attachment since the attachment and its version history must be saved. See the [[MySQL Installation guide>>Documentation.AdminGuide.InstallationMySQL]] for more information.
98 98  {{/info}}

Get Connected