You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My concern is that files which should be downloaded are renamed, and visitors shouldn't know about that.
Right now, if I'm giving a link to say Brand-ProductCatalog.pdf, the link actually points to /static/Brand-ProductCatalog-f4c0ceb6e2839acca98c07d3839833e4.pdf, and this looks weird if someone downloads it and see the digest in their finder.
If instead I'm putting the link in a .md file, thanks to gatsby-remark-copy-linked-files the path is /static/f4c0ceb6e2839acca98c07d3839833e4/Brand-ProductCatalog.pdf which is what I want: the filename isn't changed.
But I want to do it directly, without having to put the link in a .md file.
This problem was mentioned at #9777 (comment) but I can't find a commit that changes this.
The text was updated successfully, but these errors were encountered:
Well, even though the link href is exactly the same, the manual link opens the 404 page, and when the browser reloads it opens the PDF (using the component Link imported from gatsby), whereas with the Markdown link the PDF opens directly. And I can't see any hook in the code.
Summary
Change the file publicURL pattern from
${file.name}-${file.internal.contentDigest}${details.ext}
to${file.internal.contentDigest}/${file.base}
.gatsby/packages/gatsby-source-filesystem/src/extend-file-node.js
Line 17 in 2c08909
Motivation
My concern is that files which should be downloaded are renamed, and visitors shouldn't know about that.
Right now, if I'm giving a link to say
Brand-ProductCatalog.pdf
, the link actually points to/static/Brand-ProductCatalog-f4c0ceb6e2839acca98c07d3839833e4.pdf
, and this looks weird if someone downloads it and see the digest in their finder.If instead I'm putting the link in a .md file, thanks to
gatsby-remark-copy-linked-files
the path is/static/f4c0ceb6e2839acca98c07d3839833e4/Brand-ProductCatalog.pdf
which is what I want: the filename isn't changed.But I want to do it directly, without having to put the link in a .md file.
This problem was mentioned at #9777 (comment) but I can't find a commit that changes this.
The text was updated successfully, but these errors were encountered: