-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove BakedFile#mime_type
#17
Comments
I'm bundling assets inside a web app binary - it helps with setting the |
You can get the same values (or even more accurate ones) at runtime. There's no need to have this in the baked file. Regular Take a look at the current code to see how you can implement it in user code: baked_file_system/src/loader/loader.cr Line 30 in a23e823
|
Hello @straight-shoota - and what about adding update: ok I guess I can just calculate |
Yeah, I have already suggested that in #16:
But that's not related to this issue. |
About the issue with mime types: I have a PR pending to add a MIME registry to the crystal (crystal-lang/crystal#5765). When this gets merged and released we can remove |
BakedFile
doesn't need propertymime_type
. The mime type of each file can be queried at runtime. In fact, storing the mime type at compile time could lead to some unexpected behaviour when the mime type registry of the build system differs from the execution environment. I can't see any valid use case for having this property.The text was updated successfully, but these errors were encountered: