Attachments
The attachments property is used to configure the attachments card in the Details screen.
Workspaces supports the following customization options:
- duplicates
- filter
- uploadWithoutClaim
Options
duplicates
When set to true, duplicates are removed from the attachments UI.
filter
When configured, attachments that match the filter.regex pattern are included or excluded depending on the filter.action.
uploadWithoutClaim
When set to true, the hard-coded claim business rule is removed from the upload button.
info
The URL we send includes the query parameter &pageId=document so that it can be used to support special handling on the Maestro form. We also send a message using a postMessage API with the following schema:
{
pageId: 'document'
}
Example
The following example showcases how to configure the attachments card.
import { ConfigCurrentSpace } from '@transact-open-ux/workspaces/dist/types';
export const processConfig = ({ date }: any): ConfigCurrentSpace => ({
...
attachments: {
duplicates: true,
filter: {
action: 'exclude',
regex: '.zip',
},
uploadWithoutClaim: true,
},
...
});
export default processConfig;
Attributes
To review the list of supported attributes, see API Reference.