Add content disposition to S3 uploader
This commit is contained in:
parent
26704b1d94
commit
a0567a1d96
1 changed files with 2 additions and 1 deletions
|
@ -15,8 +15,9 @@ module ChunkedUploader
|
||||||
object = bucket.objects[path]
|
object = bucket.objects[path]
|
||||||
io = StringIO.new('', 'w')
|
io = StringIO.new('', 'w')
|
||||||
content_type = metadata[:content_type] ? metadata[:content_type] : nil
|
content_type = metadata[:content_type] ? metadata[:content_type] : nil
|
||||||
|
content_disposition = metadata[:content_disposition] ? metadata[:content_disposition] : nil
|
||||||
begin
|
begin
|
||||||
object.multipart_upload(:acl => :public_read, :content_type => content_type) do |upload|
|
object.multipart_upload(:acl => :public_read, :content_type => content_type, content_disposition: content_disposition) do |upload|
|
||||||
chunk_enum.each do |chunk|
|
chunk_enum.each do |chunk|
|
||||||
export_returned = io.write(chunk)
|
export_returned = io.write(chunk)
|
||||||
if (io.size >= MINIMUMBUFFER_SIZE)
|
if (io.size >= MINIMUMBUFFER_SIZE)
|
||||||
|
|
Loading…
Reference in a new issue