Merge pull request #11996 from overleaf/jel-pdf-detach-download

[web] Add download attribute to download button in file view

GitOrigin-RevId: 7fdbd970d87bd3678863f23be993a34140a5726b
This commit is contained in:
Jessica Lawshe
2023-03-08 08:42:51 -06:00
committed by Copybot
parent 5f0ac0d885
commit e773db9950
2 changed files with 4 additions and 1 deletions
@@ -24,7 +24,9 @@ function FileTreeItemMenuItems() {
<MenuItem onClick={startRenaming}>{t('rename')}</MenuItem>
) : null}
{downloadPath ? (
<MenuItem href={downloadPath}>{t('download')}</MenuItem>
<MenuItem href={downloadPath} download>
{t('download')}
</MenuItem>
) : null}
{canDelete ? (
<MenuItem onClick={startDeleting}>{t('delete')}</MenuItem>
@@ -127,6 +127,7 @@ export default function FileViewHeader({ file, storeReferencesKeys }) {
)}
&nbsp;
<a
download
href={`/project/${projectId}/file/${file.id}`}
className="btn btn-secondary-info btn-secondary"
>