Method: Google::Cloud::Storage::File#public_url
- Defined in:
- lib/google/cloud/storage/file.rb
#public_url(protocol: :https) ⇒ Object Also known as: url
Public URL to access the file. If the file is not public, requests to the URL will return an error. (See Google::Cloud::Storage::File::Acl#public! and Bucket::DefaultAcl#public!) To share a file that is not public see #signed_url.
602 603 604 |
# File 'lib/google/cloud/storage/file.rb', line 602 def public_url protocol: :https "#{protocol}://storage.googleapis.com/#{bucket}/#{name}" end |