Skip to content

Commit

Permalink
ELEMENTS-1738: Update our elements to show a view instead of a download
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuljain-dev committed Apr 24, 2024
1 parent 7d8856f commit fc698f4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ui/nuxeo-document-thumbnail/nuxeo-document-thumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,18 @@ import { I18nBehavior } from '../nuxeo-i18n-behavior';
}

_thumbnail(doc) {
return doc &&
if (
doc &&
doc.uid &&
doc.contextParameters &&
doc.contextParameters.thumbnail &&
doc.contextParameters.thumbnail.url
? doc.contextParameters.thumbnail.url
: '';
) {
const splitter = doc.contextParameters.thumbnail.url.indexOf('?') > -1 ? '&' : '?';
doc.contextParameters.thumbnail.url = `${doc.contextParameters.thumbnail.url}${splitter}clientReason=view`;
return doc.contextParameters.thumbnail.url;
}
return '';
}

_error() {
Expand Down

0 comments on commit fc698f4

Please sign in to comment.