Sha256: 7568edf834ea3bb81528d950f7a7861029ae5f9b2f11c6b6a89cd818e87d1899
Contents?: true
Size: 467 Bytes
Versions: 30
Compression:
Stored size: 467 Bytes
Contents
# frozen_string_literal: true module Shimmer class FilesController < ActionController::Base def show expires_in 1.year, public: true request.session_options[:skip] = true # prevents a session cookie from being set (would prevent caching on CDNs) proxy = FileProxy.restore(params.require(:id)) send_data proxy.file, filename: proxy.filename.to_s, type: proxy.content_type, disposition: "inline" end end end
Version data entries
30 entries across 30 versions & 1 rubygems