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.8.1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.8 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.7.1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.7 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.6.3 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.6.2 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.6.1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.6 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.4.6 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.5 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.4.5 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.4.4 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.4.3 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.4.2 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.4.1 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.4 app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.4.rc1 app/controllers/active_storage/blobs_controller.rb
spiral_form-0.1.1 vendor/bundle/gems/activestorage-5.2.3/app/controllers/active_storage/blobs_controller.rb
spiral_form-0.1.0 vendor/bundle/gems/activestorage-5.2.3/app/controllers/active_storage/blobs_controller.rb
activestorage-5.2.3 app/controllers/active_storage/blobs_controller.rb