Skip to content

Commit

Permalink
fix download link
Browse files Browse the repository at this point in the history
  • Loading branch information
bastihilger committed Jul 4, 2022
1 parent 32dc5fe commit 81cb873
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion resources/js/components/buttons/LinkButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,14 @@ export default {
.then(function (response) {
this.resetUploading();
this.removeFile();
let startPosition = response.data.url.lastIndexOf('/');
let filename = response.data.url.substr(startPosition + 1);
let attributes = {
href: response.data.url,
'tt-mode': 'file',
download: 'true',
download: filename,
};
this.setLink(attributes);
Expand Down

0 comments on commit 81cb873

Please sign in to comment.