Changes for page Attachments

Last modified by Thomas Mortagne on 2023/10/10

<
From version < 10.1 >
edited by Giovanni JĂșnior
on 2012/08/23
To version < 10.2 >
edited by Manuel Smeria
on 2012/12/18
>
Change comment: Rewording

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.giovannijunior
1 +XWiki.ManuelSmeria
Content
... ... @@ -2,22 +2,22 @@
2 2  {{toc/}}
3 3  {{/box}}
4 4  
5 -Attachments can be uploaded either through the regular [[upload action>>platform:Features.Attachments]], [[platform:Features.WebDAV]], [[platform:Features.XMLRPC]] or [[Rest>>platform:Features.XWikiRESTfulAPI]].
5 +Attachments can be uploaded either through the regular [[upload action>>platform:Features.Attachments]], [[platform:Features.WebDAV]], [[XML-RPC>>platform:Features.XMLRPC]] or [[Rest>>platform:Features.XWikiRESTfulAPI]].
6 6  As an administrator you can set limits on the maximum size of an attachment and where the attachments will be stored.
7 7  
8 8  = Size Limit =
9 9  
10 -The maximum size of an attachment is limited by a configuration parameter in XWikiPreferences document. It is set to about 10MB by default.
11 -To change it:
10 +The maximum size of an attachment is limited by a configuration parameter in the //XWikiPreferences// document. It is set to about 32MB by default.
11 +To change it follow these steps:
12 12  
13 -1. Go to <yourwiki>/xwiki/bin/edit/XWiki/XWikiPreferences?editor=object
14 -2. Click on the line that says ##XWikiPreferences 0## (right below the line that says ##Objects of type XWiki.XWikiPreferences (1)##)
15 -3. Scroll down to the field that says ##Maximum Upload Size## and change the number to whatever size you want (it is expressed in bytes)
16 -4. Scroll to the bottom and click save.
13 +1. Go to //{{{http://<yourwiki>/xwiki/bin/edit/XWiki/XWikiPreferences?editor=object}}}//
14 +1. Click on the line that says ##XWikiPreferences 0## (right below the line that says ##Objects of type XWiki.XWikiPreferences (1)##)
15 +1. Scroll down to the field that says ##Maximum Upload Size## and change the number to whatever size you want (it is expressed in bytes)
16 +1. Scroll to the bottom and click "Save"
17 17  
18 18  = Versions =
19 19  
20 -When a user uploads an attachment then uploads another attachment with the exact same name, you can decide whether or not to keep a version history of the attachments like you do with documents.
20 +When a user uploads an attachment and then uploads another attachment with the exact same name, you can decide whether or not to keep a version history of the attachments like you do with documents.
21 21  XWiki stores all document attachment versions by default which costs more storage space. If you need only latest versions of attachments, you can disable attachment version control by editing your [[xwiki.cfg>>platform:AdminGuide.Configuration#HSamplexwiki.cfg]] and adding:
22 22  
23 23  {{code language="none"}}
... ... @@ -26,7 +26,7 @@
26 26  
27 27  = Deletion =
28 28  
29 -Deleted attachments are stored in a recycle bin so that they can be restored along with the document when rolling back or previewing an earlier version where the attachment should be visible. To disable this feature, edit xwiki.cfg and add:
29 +Deleted attachments are stored in a recycle bin so that they can be restored along with the document when rolling back or previewing an earlier version where the attachment should be visible. To disable this feature, edit [[xwiki.cfg>>platform:AdminGuide.Configuration#HSamplexwiki.cfg]] and add:
30 30  
31 31  {{code language="none"}}
32 32  storage.attachment.recyclebin=0
... ... @@ -42,24 +42,24 @@
42 42  
43 43  == Database Attachment Store (Default) ==
44 44  
45 -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 keeps 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.
46 -**Note:** 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 it's version history must be saved. See [[platform:AdminGuide.InstallationMySQL]] for more information.
45 +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.
47 47  
47 +{{info}}
48 +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>>platform:AdminGuide.InstallationMySQL]] for more information.
49 +{{/info}}
50 +
48 48  == Filesystem Attachment Store (Since XWiki Enterprise 3.0M2) ==
49 49  
50 50  {{warning}}
51 -The Filesystem Attachment Store is still in beta, it has passed all of our tests with flying colors but we need your help to make absolutely sure that everything is right before turning it on by default.
54 +* The Filesystem Attachment Store is still in beta. It has passed all of our tests with flying colors but we need your help to make absolutely sure that everything is right before turning it on by default.
55 +* Known issue: the Filesystem Attachment Store is [[not able>>http://jira.xwiki.org/browse/XWIKI-7088]] to deal with images contained in imported Office documents.
52 52  {{/warning}}
53 53  
54 -{{warning}}
55 -Known issue: the Filesystem Attachment Store is [[not able>>http://jira.xwiki.org/browse/XWIKI-7088]] to deal with images contained in imported Office documents.
56 -{{/warning}}
58 +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.
57 57  
58 -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.
59 -
60 60  === Filesystem attachment store location ===
61 61  
62 -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 so that you can start the Servlet Container from any directory and still have XWiki find the attachments located in this work directory.
62 +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.
63 63  
64 64  For example:
65 65  
... ... @@ -75,7 +75,7 @@
75 75  
76 76  === New users ===
77 77  
78 -If you are a new XWiki user, all you need to do for enabling Filesystem Attachment Store is to change some settings in the [[xwiki.cfg file>>platform:AdminGuide.Configuration#HSamplexwiki.cfg]].
78 +If you are a new XWiki user, all you need to do for enabling Filesystem Attachment Store is to change some settings in the [[xwiki.cfg>>platform:AdminGuide.Configuration#HSamplexwiki.cfg]] file.
79 79  These settings should read as follows:
80 80  
81 81  {{code language="none"}}
... ... @@ -92,4 +92,4 @@
92 92  
93 93  === Other considerations ===
94 94  
95 -* If you are running a [[cluster>>platform:AdminGuide.Clustering]] you will need for each node to have a synchronized storage directory, you can use NFS or another means to mount the disk on each node in the cluster.
95 +If you are running a [[cluster>>platform:AdminGuide.Clustering]] 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