Skip to content

Commit

Permalink
WEBUI-847: use native download for aync automation blob download
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuljain-dev committed Jul 28, 2023
1 parent 685bb20 commit 4de83df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/widgets/nuxeo-operation-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ import '../actions/nuxeo-action-button-styles.js';
.match(/filename[^;=\n]*=([^;\n]*''([^;\n]*)|[^;\n]*)/)
.filter((match) => !!match);
const filename = decodeURI(filenameMatches[filenameMatches.length - 1]);
if (this.async) {
this._triggerDownload(filename, response.url);
return;
}
response.blob().then((blob) => {
const url = URL.createObjectURL(blob);
this._triggerDownload(filename, url);
Expand Down

0 comments on commit 4de83df

Please sign in to comment.