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.

Basic usage

<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>

Class members

Properties

NameTypeDefault valueDescription
acceptedFilesTypestring"*"Filter for accepted file types.
commentstringWhen you overwrite existing content, you can use the comment field to add a version comment that appears in the version history
disabledbooleanfalseToggles component disabled state (if there is no node permission checking).
fileFileCustom added file. The upload button type will be 'button' instead of 'file'
majorVersionbooleanfalsemajorVersion boolean field to true to indicate a major version should be created.
maxFilesSizenumberSets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined.
multipleFilesbooleanfalseAllows/disallows multiple files
nodeNode(Required) The node to be versioned.
nodeTypestring"cm:content"Custom node type for uploaded file
rootFolderIdstring"-root-"The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services.
staticTitlestringDefines the text of the upload button.
tooltipstringnullCustom tooltip text.
uploadFoldersbooleanfalseAllows/disallows upload folders (only for Chrome).
versioningbooleanfalseToggles versioning.

Events

NameTypeDescription
beginUploadEventEmitter<UploadFilesEvent>Emitted when the upload begins.
errorEventEmitter<FileUploadErrorEvent>Emitted when an error occurs.
permissionEventEventEmitter<PermissionModel>Emitted when create permission is missing.
successEventEmitter<any>Emitted when the file is uploaded successfully.
updateFileVersionEventEmitter<CustomEvent<any>>Emitted when dropping a file over another file to update the version.

Details

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.

See also

© 2023 Alfresco Software, Inc. All Rights Reserved.