mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-] update library to use new js-api 3.0.0 (#4097)
This commit is contained in:
committed by
Eugenio Romano
parent
2acd1b4e26
commit
3ef7d3b7ea
@@ -161,7 +161,7 @@ export class UploadService {
|
||||
* @param file The target file
|
||||
* @returns Promise that is resolved if the upload is successful or error otherwise
|
||||
*/
|
||||
getUploadPromise(file: FileModel) {
|
||||
getUploadPromise(file: FileModel): any {
|
||||
let opts: any = {
|
||||
renditions: 'doclib',
|
||||
include: ['allowableOperations']
|
||||
@@ -181,9 +181,7 @@ export class UploadService {
|
||||
}
|
||||
|
||||
if (file.id) {
|
||||
return this.apiService.getInstance().upload.updateFile(
|
||||
file.file,
|
||||
file.options.path,
|
||||
return this.apiService.getInstance().node.updateNodeContent(
|
||||
file.id,
|
||||
file.file,
|
||||
opts
|
||||
@@ -225,7 +223,6 @@ export class UploadService {
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
return promise;
|
||||
|
Reference in New Issue
Block a user