instance method
url_for_direct_upload
Ruby on Rails 7.0.10
Since v5.2.8.1 Last seen in v8.0.4Signature
url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
No documentation comment.
Parameters
-
keyreq -
expires_inkeyreq -
content_typekeyreq -
content_lengthkeyreq -
checksumkeyreq -
custom_metadatakey = {}
Source
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 89
def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
instrument :url, key: key do |payload|
generated_url = signer.signed_uri(
uri_for(key), false,
service: "b",
permissions: "rw",
expiry: format_expiry(expires_in)
).to_s
payload[:url] = generated_url
generated_url
end
end
Defined in activestorage/lib/active_storage/service/azure_storage_service.rb line 89
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Service::AzureStorageService