Activates a file version upload.
Until further backend API improvements are implemented, this component is meant to be used to enrich the features and decrease the restrictions currently applied to node version uploading.
<adf-upload-version-button
staticTitle="Upload new version"
[node]="node"
[rootFolderId]="node.parentId"
[versioning]="true"
(success)="onUploadSuccess($event)"
(error)="onUploadError($event)">
</adf-upload-version-button>
Name | Type | Default value | Description |
---|---|---|---|
acceptedFilesType | string | "*" | Filter for accepted file types. |
comment | string | When you overwrite existing content, you can use the comment field to add a version comment that appears in the version history | |
disabled | boolean | false | Toggles component disabled state (if there is no node permission checking). |
file | File | Custom added file. The upload button type will be 'button' instead of 'file' | |
majorVersion | boolean | false | majorVersion boolean field to true to indicate a major version should be created. |
maxFilesSize | number | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. | |
multipleFiles | boolean | false | Allows/disallows multiple files |
node | Node | (Required) The node to be versioned. | |
nodeType | string | "cm:content" | Custom node type for uploaded file |
rootFolderId | string | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
staticTitle | string | Defines the text of the upload button. | |
tooltip | string | null | Custom tooltip text. |
uploadFolders | boolean | false | Allows/disallows upload folders (only for Chrome). |
versioning | boolean | false | Toggles versioning. |
Name | Type | Description |
---|---|---|
beginUpload | EventEmitter < UploadFilesEvent > | Emitted when the upload begins. |
error | EventEmitter < FileUploadErrorEvent > | Emitted when an error occurs. |
permissionEvent | EventEmitter < PermissionModel > | Emitted when create permission is missing. |
success | EventEmitter <any> | Emitted when the file is uploaded successfully. |
updateFileVersion | EventEmitter <CustomEvent<any>> | Emitted when dropping a file over another file to update the version. |
This component extends the Upload Button component. The
properties and events are the same except for the node
property that specifies the node
to be versioned (this is a required input parameter). However, some properties don't make
sense when applied to the Upload Version Button component so they are simply ignored.
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.