Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ a `:prefix` in the storage configuration.
Tus::Storage::S3.new(prefix: "tus", **options)
```

You can also specify additional options that will be fowarded to
You can also specify additional options that will be forwarded to
[`Aws::S3::Client#create_multipart_upload`] using `:upload_options`.

```rb
Tus::Storage::S3.new(upload_options: { acl: "public-read" }, **options)
Tus::Storage::S3.new(upload_options: { acl: "public-read", disposition: "attachment" }, **options)
```

All other options will be forwarded to [`Aws::S3::Client#initialize`]:
Expand Down
3 changes: 2 additions & 1 deletion lib/tus/storage/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def create_file(uid, info = {})

options = {}
options[:content_type] = tus_info.type if tus_info.type
options[:content_disposition] = ContentDisposition.inline(tus_info.name) if tus_info.name
options[:content_disposition] = ContentDisposition.(disposition: upload_options[:disposition] || "inline", filename: tus_info.name)
upload_options.delete(:disposition)
options.merge!(upload_options)

multipart_upload = object(uid).initiate_multipart_upload(options)
Expand Down