Class: Glib::BlobUrlGeneratorsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/glib/blob_url_generators_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



18
19
20
21
22
23
# File 'app/controllers/glib/blob_url_generators_controller.rb', line 18

def create
  blob = ::ActiveStorage::Blob.find_signed(params[:signed_id])
  url = blob.present? ? rails_blob_path(blob) : nil

  render json: { url: url }
end