You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| disableDownload | boolean | If true, disables the download button in the export preview UI. |
63
-
| disableJobsQueue | boolean | If true, forces the export to run synchronously. |
64
-
| disableSave | boolean | If true, disables the save button in the export preview UI. |
65
-
| format | string | Forces a specific export format (`csv` or `json`), hides the format dropdown, and prevents the user from choosing the export format. |
66
-
| overrideExportCollection | function | Function to override the default export collection; takes the default export collection and allows you to modify and return it. |
|`collections`| string[]| Collections to include Import/Export controls in. Defaults to all collections. |
61
+
|`debug`| boolean | If true, enables debug logging. |
62
+
|`disableDownload`| boolean | If true, disables the download button in the export preview UI. |
63
+
|`disableJobsQueue`| boolean | If true, forces the export to run synchronously. |
64
+
|`disableSave`| boolean | If true, disables the save button in the export preview UI. |
65
+
|`format`| string | Forces a specific export format (`csv` or `json`), hides the format dropdown, and prevents the user from choosing the export format. |
66
+
|`overrideExportCollection`| function | Function to override the default export collection; takes the default export collection and allows you to modify and return it. |
67
67
68
68
## Field Options
69
69
70
70
In addition to the above plugin configuration options, you can granularly set the following field level options using the `custom['plugin-import-export']` properties in any of your collections.
There are four possible ways that the plugin allows for exporting documents, the first two are available in the admin UI from the list view of a collection:
125
+
126
+
1. Direct download - Using a `POST` to `/api/exports/download` and streams the response as a file download
127
+
2. File storage - Goes to the `exports` collection as an uploads enabled collection
128
+
3. Local API - A create call to the uploads collection: `payload.create({ slug: 'uploads', ...parameters })`
129
+
4. Jobs Queue - `payload.jobs.queue({ task: 'createCollectionExport', input: parameters })`
130
+
131
+
By default, a user can use the Export drawer to create a file download by choosing `Save` or stream a downloadable file directly without persisting it by using the `Download` button. Either option can be disabled to provide the export experience you desire for your use-case.
132
+
133
+
The UI for creating exports provides options so that users can be selective about which documents to include and also which columns or fields to include.
134
+
135
+
It is necessary to add access control to the uploads collection configuration using the `overrideExportCollection` function if you have enabled this plugin on collections with data that some authenticated users should not have access to.
136
+
137
+
<Bannertype="warning">
138
+
**Note**: Users who have read access to the upload collection may be able to
139
+
download data that is normally not readable due to [access
140
+
control](../access-control/overview).
141
+
</Banner>
142
+
143
+
The following parameters are used by the export function to handle requests:
0 commit comments