instance method
service_url_for_direct_upload
Ruby on Rails 5.2.8.1
Since v5.2.8.1Signature
service_url_for_direct_upload(expires_in: service.url_expires_in)
Returns a URL that can be used to directly upload a file for this blob on the service. This URL is intended to be short-lived for security and only generated on-demand by the client-side JavaScript responsible for doing the uploading.
Parameters
-
expires_inkey = service.url_expires_in
Source
# File activestorage/app/models/active_storage/blob.rb, line 133
def service_url_for_direct_upload(expires_in: service.url_expires_in)
service.url_for_direct_upload key, expires_in: expires_in, content_type: content_type, content_length: byte_size, checksum: checksum
end
Defined in activestorage/app/models/active_storage/blob.rb line 133
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Blob