Attachment Picker Macro
![]() | Display an attachment picker. |
Type | JAR |
Category | Macro |
Developed by | |
Active Installs | 131 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Compatibility | 14.4RC1+ |
Description
Provides a macro to search and select for an attachment. The results are presented in a grid.
Note: The results are retrieved from the document indexation. Not yet indexed content are not part of the returned search result.
Related widgets:
14.10.1+, 15.0+ It is possible to select the search scope, either the current page only, or all viewable pages.
In addition, a warning is displayed to the user when the selected attachment is not from the current page.
Usage
{{attachmentGalleryPicker id="myid"/}}
{{attachmentGalleryPicker filter="image/*"/}}
{{attachmentGalleryPicker limit="5"/}}
## Since 14.10.2/15.0-rc-1
{{attachmentGalleryPicker target="Space.Page"/}}
Parameters
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
id | yes | valid syntax id | N/A | The id of the rendered attachment picker |
filter | yes | a comma separated list of mimetypes | N/A | The mimetypes used to filter the displayed search results |
limit | yes | a positive integer | 20 | The number of results displayed to the user |
14.10.2+, 15.0+ target | yes | A document reference | N/A | The document reference to use as the current page |
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Dependencies
Dependencies for this extension (org.xwiki.platform:xwiki-platform-attachment-picker-macro 15.7):
- org.xwiki.commons:xwiki-commons-stability 15.7
- org.xwiki.commons:xwiki-commons-component-api 15.7
- org.xwiki.rendering:xwiki-rendering-transformation-macro 15.7
- org.xwiki.platform:xwiki-platform-skin-api 15.7
- org.xwiki.platform:xwiki-platform-localization-api 15.7
- org.xwiki.platform:xwiki-platform-attachment-picker-webjar 15.7