Closed Tzal3x closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
walrus-site | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 19, 2024 9:29am |
Thanks @Tzal3x , this is great. Just one quick question: this should work even if the file has no filename, but only the extension (e.g.,
.gitignore
), correct?
Correct! 👍 Here is an site Resource
example of a .svg
file: https://suiscan.xyz/testnet/object/0xca8703f61474f846c354583c178a9e584b6a4b07b9c81a9e1c769485147eaf28
Summary
Treat files without or with unknown extension as binary files.
Whenever the dir that is to be published contains a file with no extension (e.g.
file
) or an unknown extension (e.g.file.<unknown>
), a binary content type will be assigned to it, and a warning will be shown.The octet-stream content type indicates a response body with arbitrary binary data as defined in RFC 2046.
https://datatracker.ietf.org/doc/html/rfc2046#section-4.5.1
Example output
Given the following tree structure:
And running
./target/release/site-builder --config site-builder/assets/builder-example.yaml publish examples/snake/
Returns:
Here is the site Resource object of the file with unknown extension.
Closes #110