Skip to content
This repository was archived by the owner on Feb 4, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions s3_sample.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,8 +47,11 @@
#
# For more information on Aws::S3::Object#put, see:
# http://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Object.html#put-instance_method
object = bucket.object('ruby_sample_key.txt')
object.put(body: "Hello World!")
object = bucket.put_object({
acl: "public-read",
body: "Hello World!",
key: "ruby_sample_key.txt" # required
})

# Aws::S3::Object#public_url generates an un-authenticated URL for the object.
#
Expand Down