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

Version Path
shimmer-0.0.33 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.32 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.31 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.30 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.29 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.28 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.27 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.26 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.25 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.24 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.23 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.22 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.21 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.20 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.19 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.18 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.17 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.16 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.15 lib/shimmer/controllers/files_controller.rb
shimmer-0.0.14 lib/shimmer/controllers/files_controller.rb