Fix SAAS-922 for files on S3 too

This commit is contained in:
Albert Santoni 2015-07-15 17:33:33 -04:00
parent 7ecabffbe8
commit 064e1bd4e0
5 changed files with 8 additions and 8 deletions

View file

@ -42,12 +42,12 @@ class Amazon_S3StorageBackend extends StorageBackend
}
/** Returns a signed download URL from Amazon S3, expiring in 60 minutes */
public function getDownloadURLs($resourceId)
public function getDownloadURLs($resourceId, $contentDispositionFilename)
{
$urls = array();
$signedS3Url = $this->s3Client->getObjectUrl($this->getBucket(), $resourceId, '+60 minutes');
$s3args = array('response-content-disposition', "attachment; filename=" . urlencode($contentDispositionFilename));
$signedS3Url = $this->s3Client->getObjectUrl($this->getBucket(), $resourceId, '+60 minutes', $s3args);
//If we're using the proxy cache, we need to modify the request URL after it has
//been generated by the above. (The request signature must be for the amazonaws.com,