Attachments

Last modified by Pierre Jeanjean on 2024/10/08

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. 

Attaching a file

There are 3 possibilities to attach a file:

Using the top level menu

You can add an attachment using the "More actions" menu:

AddAttachmentsFlamingo.png

When clicked, it'll direct you to the Attachments tab located at the bottom of the page:

view-attachments.png

Using the attachment tab at the bottom of the page

View the page on which you wish to attach a file and then click on the "Attachments" tab at the bottom of the page.

attachments.png

Note that the file selector that appears allows you to select as many files as you wish to upload. Thus you don't need to add attachments one by one.

Use the arrows in the upper right corner to navigate to uploaded files.

Using the WYSIWYG editor

Edit the page on which you wish to attach a file using the WYSIWYG editor. To link a specific text with an attachment click on "Link" in the toolbar. From the arrow change Page to Attachment or click on Upload to add a new file directly.

To add an image directly in the page click on "Image" and select an existing one from the wiki or click on Upload and add a new image from your computer.

AttachmentWysiwygToucan.png

Moving an attachment

XWiki 14.0+

attachment_button.png

A button is available in the attachments pane, allowing to move or rename an attachment. It is possible to change the name or the location of the attachments. Optionally, a redirection action is proposed, allowing to automatically redirect requests to the old location of an attachment to the new one.

XWiki 14.2+

move_attachment_refactoring.png

When moving an attachment, the pages using the moved attachment are automatically refactored to point to the new location of the attachment. Advanced users can deactivate this refactoring in the move attachment form.

Deleting an attachment

An attachment can be deleted by pressing the delete button that is shown only if the user has the specific rights for this. Also, a confirmation modal is provided for the action to be completed.

deleteAttachmentModal.png

Linking to an attached file/image

If you're using the Wiki editor, you can use the Wiki Syntax to display an image inline or link to an attachment.

If you're using the WYSIWYG editor, then use the "Link" or "Image" buttons as shown above.

Linking to an external file/image

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:

  • XWiki Syntax 1.0: [http://some_remote_server/path/to/file>text to display]
  • XWiki Syntax 2.0: [[text to display>>http://some_remote_server/path/to/file]]

For displaying an image located on a remote server, use the following HTML code snippet:

  • XWiki Syntax 1.0: <img src="http://some_remote_server/path/to/image"/>
  • XWiki Syntax 2.0: image:http://some_remote_server/path/to/image

See the XWiki Syntax Guide for more details.

Backlinks indexation

XWiki 14.2+ Page including attachments (or images) from other pages are now listed in their backlinks.

Upload summary

XWiki 16.3.0+

When upload summaries are enabled by the administrator, you can include descriptions to your uploads done through the Attachment tab.

upload-summary.png

These upload summaries will then be displayed for each upload in the revision history of the attachment.
Note that if you upload multiple files at the same time with, e.g., a drag and drop, they will share the same upload summary.

Size Limit

The maximum size of an attachment is limited by the administrator. By default it is set at about 32 megabytes.

Learn More

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.

Get Connected