Skip to content

Commit

Permalink
WEBUI-1040:view vs download download when clicked on file name
Browse files Browse the repository at this point in the history
  • Loading branch information
swarnadipa-dev committed Feb 6, 2023
1 parent 6f2c4c0 commit f186579
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions elements/document/nuxeo-picture-formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Polymer({
<span>[[item.dimensions]]</span>
<span>[[item.size]]</span>
<span>[[item.format]]</span>
<a id="download-[[index]]" href="[[item.downloadData]]">
<a id="download-[[index]]" href="[[item.downloadUrl]]">
<iron-icon
icon="nuxeo:download"
aria-label="[[i18n('pictureViewLayout.download.tooltip')]] [[item.name]] [[item.dimensions]]"
Expand Down Expand Up @@ -88,7 +88,7 @@ Polymer({
dimensions: `${view.info.width} x ${view.info.height}`,
size: this.formatSize(view.content.length),
format: view.info.format,
downloadData: view.content.downloadData,
downloadUrl: view.content.downloadUrl,
};
})
: [];
Expand Down
2 changes: 1 addition & 1 deletion elements/nuxeo-document-blob/nuxeo-document-blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Polymer({
<template is="dom-if" if="[[blob]]">
<div class="row">
<div class="info">
<div><a href="[[blob.viewData]]" title="[[blob.name]]">[[blob.name]]</a></div>
<div><a href="[[blob.downloadUrl]]" title="[[blob.name]]">[[blob.name]]</a></div>
<div class="detail">[[formatSize(blob.length)]]</div>
</div>
<div class="actions">
Expand Down
4 changes: 2 additions & 2 deletions test/nuxeo-picture-formats.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ suite('nuxeo-picture-formats', () => {
content: {
data: 'file1.jpeg?changeToken=1-0',
length: '',
downloadData: 'file1.jpeg?changeToken=1-0&clientReason=download',
downloadUrl: 'file1.jpeg?changeToken=1-0&clientReason=download',
},
},
],
Expand All @@ -64,7 +64,7 @@ suite('nuxeo-picture-formats', () => {
dimensions: '66 x 66',
size: '',
format: 'picture/jpeg',
downloadData: 'file1.jpeg?changeToken=1-0&clientReason=download',
downloadUrl: 'file1.jpeg?changeToken=1-0&clientReason=download',
},
];
element.xpath = 'file:content';
Expand Down

0 comments on commit f186579

Please sign in to comment.