Wiki source code of Attachments
Version 23.1 by Silvia Macovei on 2012/03/07
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{box cssClass="floatinginfobox" title="**Contents**"}} | ||
2 | {{toc/}} | ||
3 | {{/box}} | ||
4 | |||
5 | A page can contain attachments which can then later be referenced from within a page. For example this is very useful for attaching images and displaying them in the page's content. | ||
6 | |||
7 | = Attaching a file = | ||
8 | |||
9 | There are 3 possibilities to attach a file: | ||
10 | |||
11 | == Using the top level menu == | ||
12 | |||
13 | Starting with XWiki 2.6, you can add an attachment using the new Add menu: | ||
14 | |||
15 | [[image:AddAttachmentsColibri.png]] | ||
16 | //Screenshot of the Colibri skin// | ||
17 | |||
18 | [[image:ViewAttachmentsColibri.png]] | ||
19 | //Screenshot of the Colibri skin// | ||
20 | |||
21 | View the page on which you wish to attach a file and then select the "View > Attachments" option in the top level menu: | ||
22 | |||
23 | [[image:ViewAttachments.png]] | ||
24 | //Screenshot of the Toucan Skin// | ||
25 | |||
26 | You'll see a list of the current attachments and a possibility to upload more files: | ||
27 | |||
28 | [[image:AttachmentBottomToucan.PNG]] | ||
29 | //Screenshot of the Toucan Skin// | ||
30 | |||
31 | == Using the attachment panel at the bottom of the page == | ||
32 | |||
33 | View the page on which you wish to attach a file and then click on "Attachments" at the bottom of the page. | ||
34 | |||
35 | image:AttachmentBottomToucan.PNG | ||
36 | //Screenshot of the Toucan Skin// | ||
37 | |||
38 | image:AttachmentBottomColibri.PNG | ||
39 | //Screenshot of the Colibri Skin// | ||
40 | |||
41 | == Using the WYSIWYG editor == | ||
42 | |||
43 | Edit the page on which you wish to attach a file using the WYSIWYG editor and click on "Link > Attached file..." in the toolbar. You can also click on "Image > Insert image" and you'll get a similar popup window as shown below: | ||
44 | |||
45 | image:AttachmentWysiwygToucan.PNG | ||
46 | |||
47 | Note that you can create a link to the attachment/image directly in that same popup window. | ||
48 | |||
49 | = Linking to an attached file/image = | ||
50 | |||
51 | If you're using the Wiki editor, you can use the [[Wiki Syntax>>platform:Main.XWikiSyntax]] to display an image inline or link to an attachment. | ||
52 | |||
53 | If you're using the WYSIWYG editor, then use the "Link > Attached file..." or "Image > Insert image" buttons as shown above. | ||
54 | |||
55 | = Linking to an external file/image = | ||
56 | |||
57 | If your file is on a remote server and you wish to link to it from your wiki, simply use the URL of the link as the content of your wiki link. For example, using the wiki editor you'd write: | ||
58 | |||
59 | * **XWiki Syntax 1.0**: {{code language="none"}}[http://some_remote_server/path/to/file>text to display]{{/code}} | ||
60 | * **XWiki Syntax 2.0**: {{code language="none"}}[[text to display>>http://some_remote_server/path/to/file]]{{/code}} | ||
61 | |||
62 | For displaying an image located on a remote server, use the following HTML code snippet: | ||
63 | |||
64 | * **XWiki Syntax 1.0**: {{code language="xml"}}<img src="http://some_remote_server/path/to/image"/>{{/code}} | ||
65 | * **XWiki Syntax 2.0**: {{code language="none"}}image:http://some_remote_server/path/to/image{{/code}} | ||
66 | |||
67 | See the [[XWiki Syntax Guide>>platform:Main.XWikiSyntax]] for more details. | ||
68 | |||
69 | = Size Limit = | ||
70 | |||
71 | The maximum size of an attachment is limited by the administrator, by default it is set at about ten megabytes. | ||
72 | |||
73 | = Learn More = | ||
74 | |||
75 | For more information about how XWiki attachments work and how to configure/tune the attachment store, you can examine the [[administrator's guide to attachments>>platform:AdminGuide.Attachments]]. |