Skip to content

Commit cf223bd

Browse files
authored
Merge pull request #3472 from OpenNeuroOrg/download-filename-fix
fix(app): Include a suggested filename in download links
2 parents de0e70b + b910cff commit cf223bd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/openneuro-app/src/scripts/dataset/files/__tests__/__snapshots__/file.spec.jsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ exports[`File component > renders for dataset snapshots 1`] = `
2929
>
3030
<a
3131
aria-label="download file"
32-
download=""
32+
download="README"
3333
href="/crn/datasets/ds001/snapshots/1.0.0/files/README"
3434
>
3535
<i
@@ -90,7 +90,7 @@ exports[`File component > renders with common props 1`] = `
9090
>
9191
<a
9292
aria-label="download file"
93-
download=""
93+
download="README"
9494
href="/crn/datasets/ds001/files/README"
9595
>
9696
<i

packages/openneuro-app/src/scripts/dataset/files/file.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const File = ({
149149
<a
150150
href={urls?.[0] ||
151151
apiPath(datasetId, snapshotTag, filePath(path, filename))}
152-
download
152+
download={filename}
153153
aria-label="download file"
154154
>
155155
<i className="fa fa-download" />

0 commit comments

Comments
 (0)