fix(gatsby-source-contentful): Add file-extension to remote cached items #25924
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the .base64 file extension to all files created in the "remote_cache" directory (.cache/remote_cache/images)
Documentation
We noticed when using Azure WebApps (Linux based) where we host preview server(s) using the instructions on Running a Gatsby Preview Server (Which are docker containers under the hood) we get alot of " no such file or directory, open '.cache/remote_cache/images/80f�[0m �[0m�[97m[41mcfcfd88d0e8d6272c698ab6dc2257c192c4b9'�[0m" (Please ignore the color codes included in the logging, this is not the issue currently)
When you try to remove/access the file via one of the methods (viewing it on ssh/remote or via FTP) you also get an access denied errors and/or file not found.
Since i noticed it was using extensionless files (and i assumed it might be an issue) i patched the file extend-node-type.js with a file extension and i noticed the problems going away :) So for this reason i thought it would be great to create a PR to improve this for everyone!
Related Issues
Since this is such a small change i did not create a issue but rather create a PR, i could create one if required.
But it's an extension to the work done in #22551