Display a dialog that allows to upload new file version or to manage the current node versions.
NewVersionUploaderDialogData
, config: MatDialogConfig
): Observable
NewVersionUploaderDialogData
- The data to pass to the dialogMatDialogConfig
- A configuration object that allows to override default dialog configuration string
- Element's selector which should be autofocused after closing modalObservable
- Observable
which you can subscribe in order to get information about the dialog actions or error notification in case of error condition.You can open dialog in two different ways:
The dialog shows
Usage example:
import { NewVersionUploaderService } from '@alfresco/adf-content-services'
constructor(private newVersionUploaderService: NewVersionUploaderService){}
yourFunctionToOpenDialog(){
const newVersionUploaderDialogData: NewVersionUploaderDialogData = {
file,
node
};
this.newVersionUploaderService.openUploadNewVersionDialog(newVersionUploaderDialogData).subscribe(
(data: NewVersionUploaderData) => {
// place your action here on operation success!
},
(error) => {
// place your action here on operation error!
})
}
Setting showVersionsOnly
to true
the dialog displays the version history of a node, with the ability to restore, delete and view version of the current node
Usage example:
import { NewVersionUploaderService } from '@alfresco/adf-content-services'
constructor(private newVersionUploaderService: NewVersionUploaderService){}
yourFunctionToOpenDialog(){
const newVersionUploaderDialogData: NewVersionUploaderDialogData = {
file,
node,
showVersionsOnly: true
};
this.newVersionUploaderService.openUploadNewVersionDialog(newVersionUploaderDialogData).subscribe(
(data: NewVersionUploaderData) => {
// place your action here on operation success!
})
}
© 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.