Class: ActiveStorage::DirectUploadsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ActiveStorage::DirectUploadsController
- Defined in:
- app/controllers/active_storage/direct_uploads_controller.rb
Overview
Creates a new blob on the server side in anticipation of a direct-to-service upload from the client side. When the client-side upload is completed, the signed_blob_id can be submitted as part of the form to reference the blob that was created up front.
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 |
# File 'app/controllers/active_storage/direct_uploads_controller.rb', line 5 def create blob = ActiveStorage::Blob.create_before_direct_upload!(blob_args) render json: direct_upload_json(blob) end |