Add Icons for apps

This commit is contained in:
Dan Milne
2025-11-25 19:11:22 +11:00
parent d6029556d3
commit 67d86e5835
3 changed files with 167 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Configure ActiveStorage content type resolution
Rails.application.config.after_initialize do
# Ensure SVG files are served with the correct content type
ActiveStorage::Blob.class_eval do
def content_type_for_serving
# Override content type for SVG files
if filename.extension == "svg" && content_type == "application/octet-stream"
"image/svg+xml"
else
content_type
end
end
end
end