Thumbnails for ng2 file list

This commit is contained in:
Denys Vuika
2016-04-15 16:25:12 +01:00
parent 6832e591b4
commit d951c00ac6
2 changed files with 30 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ import {Injectable} from 'angular2/core';
import {Http, Response, RequestOptions, Headers} from 'angular2/http';
import {Observable} from 'rxjs/Observable';
import {FolderEntity} from "./core/entities/folder.entity";
import {DocumentEntity} from "./core/entities/document.entity";
@Injectable()
export class AlfrescoService {
@@ -23,6 +24,10 @@ export class AlfrescoService {
.catch(this.handleError);
}
getDocumentThumbnailUrl(document: DocumentEntity) {
return this._host + '/alfresco/service/api/node/' + document.nodeRef.replace('://', '/') + '/content/thumbnails/doclib?c=queue&ph=true&lastModified=1';
}
private handleError (error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console