mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
upgrade to latest JS-API and ADF (#896)
* improved update script and latest ADF libs * upgrade to latest js-api and ADF * upgrade tests * update viewer code * use @alfresco/js-api * update to latest adf * fix deprecation issues * update viewer * fix copy/move dialog * change expect * fix remove site from favorites * fix unit test * update adf version * use ADF upload dialog
This commit is contained in:
@@ -25,10 +25,12 @@
|
||||
|
||||
import { RepoApi } from '../repo-api';
|
||||
import { E2E_ROOT_PATH } from '../../../../configs';
|
||||
import { UploadApi as AdfUploadApi } from '@alfresco/js-api';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
export class UploadApi extends RepoApi {
|
||||
upload = new AdfUploadApi(this.alfrescoJsApi);
|
||||
|
||||
constructor(username?, password?) {
|
||||
super(username, password);
|
||||
@@ -42,7 +44,7 @@ export class UploadApi extends RepoApi {
|
||||
};
|
||||
|
||||
await this.apiAuth();
|
||||
return await this.alfrescoJsApi.upload.uploadFile(file, '', parentFolderId, null, opts);
|
||||
return await this.upload.uploadFile(file, '', parentFolderId, null, opts);
|
||||
}
|
||||
|
||||
async uploadFileWithRename(fileName: string, parentFolderId: string = '-my-', newName: string) {
|
||||
@@ -53,7 +55,7 @@ export class UploadApi extends RepoApi {
|
||||
};
|
||||
|
||||
await this.apiAuth();
|
||||
return await this.alfrescoJsApi.upload.uploadFile(file, '', parentFolderId, null, opts);
|
||||
return await this.upload.uploadFile(file, '', parentFolderId, null, opts);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user