Wiki source code of Attachments

Version 8.1 by Silvia Macovei on 2009/10/19

Hide last authors
Silvia Macovei 7.2 1 (% class="floatinginfobox" %)
2 (((**Contents**
Silvia Macovei 7.1 3
Silvia Macovei 7.2 4 {{toc start=2 depth=6 numbered=false scope=page /}})))
Vincent Massol 6.1 5
Silvia Macovei 7.1 6 = Attachments =
Vincent Massol 1.1 7
Vincent Massol 1.33 8 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.
Vincent Massol 1.1 9
Silvia Macovei 7.1 10 == Attaching a file ==
Vincent Massol 1.1 11
Silvia Macovei 8.1 12 There are 3 possibilities to attach a file:
Vincent Massol 1.26 13
Silvia Macovei 7.1 14 === Using the top level menu ===
Vincent Massol 1.29 15
Silvia Macovei 7.7 16 View the page on which you wish to attach a file and then select the "Show > Attachments" option in the top level menu:
Vincent Massol 1.29 17
Silvia Macovei 7.6 18 image:AttachmentMenuToucan.PNG
Silvia Macovei 8.1 19 //Screenshot of the Toucan Skin//
Vincent Massol 1.26 20
Vincent Massol 1.29 21 You'll see a list of the current attachments and a possibility to upload more files:
22
Silvia Macovei 7.6 23 image:AttachmentBottomToucan.PNG
Silvia Macovei 8.1 24 //Screenshot of the Toucan Skin//
Vincent Massol 1.26 25
Silvia Macovei 8.1 26 {{info}} For the [[Colibri skin>>http://code.xwiki.org/xwiki/bin/view/Skins/ColibriSkin]] there is no "Show > Attachments" option in the top level menu. {{/info}}
27
Silvia Macovei 7.1 28 === Using the attachment panel at the bottom of the page ===
Vincent Massol 1.26 29
Silvia Macovei 8.1 30 View the page on which you wish to attach a file and then click on "Attachments" at the bottom of the page.
Vincent Massol 1.29 31
Silvia Macovei 8.1 32 image:AttachmentBottomToucan.PNG
33 //Screenshot of the Toucan Skin//
34
35 image:AttachmentBottomColibri.PNG
36 //Screenshot of the Colibri Skin//
37
Silvia Macovei 7.1 38 === Using the WYSIWYG editor ===
Vincent Massol 1.29 39
Silvia Macovei 7.8 40 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:
Vincent Massol 1.29 41
Silvia Macovei 7.6 42 image:AttachmentWysiwygToucan.PNG
Vincent Massol 1.29 43
44 Note that you can create a link to the attachment/image directly in that same popup window.
45
Silvia Macovei 7.1 46 == Linking to an attached file/image ==
Vincent Massol 1.29 47
Silvia Macovei 7.1 48 If you're using the Wiki editor, you can use the [[Image macro>>code:Macros.ImageMacro]] to display an image inline. If you simply wish to link to an attachment, use the [[Attach macro>>code:Macros.AttachMacro]].
Vincent Massol 1.31 49
Silvia Macovei 8.1 50 {{info}} In syntax 2.0 you don't need the {image} and {attach} macros. {{/info}}
51
Silvia Macovei 7.8 52 If you're using the WYSIWYG editor, then use the "Link > Attached file..." or "Image > Insert image" buttons as shown above.
Vincent Massol 1.33 53
Silvia Macovei 7.1 54 == Linking to an external file/image ==
Vincent Massol 1.33 55
Vincent Massol 1.35 56 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:
Vincent Massol 1.34 57
Silvia Macovei 7.1 58 {{code language="xml"}}[http://some_remote_server/path/to/file>text to display]{{/code}}
Vincent Massol 1.34 59
60 For displaying an image located on a remote server, use the following HTML code snippet:
61
Silvia Macovei 7.1 62 {{code language="xml"}}<img src="http://some_remote_server/path/to/image"/>{{/code}}

Get Connected