Sha256: a6077cfa2b52d64ee7128fcb0daa89db3fd8aca0c3451af54b613d94fe1d426c

Contents?: true

Size: 621 Bytes

Versions: 28

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

# Take a signed permanent reference for a blob and turn it into an expiring service URL for download.
# Note: These URLs are publicly accessible. If you need to enforce access protection beyond the
# security-through-obscurity factor of the signed blob references, you'll need to implement your own
# authenticated redirection controller.
class ActiveStorage::BlobsController < ActiveStorage::BaseController
  include ActiveStorage::SetBlob

  def show
    expires_in ActiveStorage::Blob.service.url_expires_in
    redirect_to @blob.service_url(disposition: params[:disposition])
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
activestorage-5.2.3.rc1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.2.1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.2 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.2.rc1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.1.1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.1.rc1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.0 app/controllers/active_storage/blobs_controller.rb