[ADF-2254] always update display name for ACS nodes (#2926)

* always update display name for ACS nodes
* remove the test that tests opposite behaviour
This commit is contained in:
Denys Vuika
2018-02-09 16:48:25 +00:00
committed by Eugenio Romano
parent 3114fa4862
commit 2bfed5818f
2 changed files with 39 additions and 24 deletions

View File

@@ -240,7 +240,7 @@ export class ViewerComponent implements OnChanges {
this.setUpUrlFile();
} else if (this.fileNodeId) {
this.isLoading = true;
this.apiService.getInstance().nodes.getNodeInfo(this.fileNodeId).then(
this.apiService.nodesApi.getNodeInfo(this.fileNodeId).then(
(data: MinimalNodeEntryEntity) => {
this.setUpNodeFile(data);
},
@@ -295,12 +295,12 @@ export class ViewerComponent implements OnChanges {
private setUpNodeFile(data: MinimalNodeEntryEntity) {
this.mimeType = data.content.mimeType;
this.displayName = this.getDisplayName(data.name);
this.urlFileContent = this.apiService.getInstance().content.getContentUrl(data.id);
this.displayName = data.name;
this.urlFileContent = this.apiService.contentApi.getContentUrl(data.id);
this.extension = this.getFileExtension(data.name);
this.fileName = data.name;
this.downloadUrl = this.apiService.getInstance().content.getContentUrl(data.id, true);
this.downloadUrl = this.apiService.contentApi.getContentUrl(data.id, true);
this.viewerType = this.getViewerTypeByExtension(this.extension);
if (this.viewerType === 'unknown') {