Subject: | Add support for Content-Disposition header |
This simple patch for Net::Amazon::S3::Object.pm adds support for
providing the Content-Disposition header to S3, which is very useful to
provide a file name and wether a file should be download inline/as
attachment via the public Amazon link.
Subject: | Net-Amazon-S3_content_disposition.patch |
--- portage/dev-perl/Net-Amazon-S3/Object.pm_orig
+++ lib64/perl5/vendor_perl/5.12.1/Net/Amazon/S3/Client/Object.pm
@@ -30,6 +30,12 @@
required => 0,
default => 'binary/octet-stream'
);
+has 'content_disposition' => (
+ is => 'ro',
+ isa => 'Str',
+ required => 0,
+ default => 'inline'
+);
has 'content_encoding' => (
is => 'ro',
isa => 'Str',
@@ -110,6 +116,7 @@
'Content-MD5' => $md5_base64,
'Content-Length' => length $value,
'Content-Type' => $self->content_type,
+ 'Content-Disposition' => $self->content_disposition,
};
if ( $self->expires ) {