Skip to content

Commit

Permalink
Add download attribute to export <a> tag (#799)
Browse files Browse the repository at this point in the history
* Add download attribute to export <a> tag
  • Loading branch information
imnasnainaec authored Nov 4, 2020
1 parent 9ad8d8d commit a436818
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,20 @@ export default function ExportProjectButton(
return (
<React.Fragment>
<LoadingButton
onClick={() => getFile()}
onClick={getFile}
color="primary"
loading={loading}
{...props}
>
<Translate id="buttons.export" />
</LoadingButton>
{fileUrl && (
<a ref={downloadLink} href={fileUrl} style={{ display: "none" }}>
<a
ref={downloadLink}
href={fileUrl}
download
style={{ display: "none" }}
>
(This link should not be visible)
</a>
)}
Expand Down

0 comments on commit a436818

Please sign in to comment.