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 8864e0139f
commit 4380f20f08
2 changed files with 4 additions and 1 deletions

View file

@ -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>

View file

@ -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"
>