1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Apply PR feedback

This commit is contained in:
Tim Daubenschütz 2016-02-22 12:18:40 +01:00
parent f2c7f02480
commit 23efaa368e
2 changed files with 16 additions and 18 deletions

View File

@ -69,23 +69,21 @@ const S3DownloadButton = React.createClass({
const { downloadUrl } = this.state; const { downloadUrl } = this.state;
return ( return (
<span> <a
<a ref="downloadButton"
ref="downloadButton" download
download className="btn btn-xs btn-default ascribe-margin-1px"
className="btn btn-xs btn-default ascribe-margin-1px" target="_blank"
target="_blank" onClick={this.reSignUrl}
onClick={this.reSignUrl} href={downloadUrl || url}>
href={downloadUrl || url}> {/*
{/* If it turns out that `fileExtension` is an empty string, we're just
If it turns out that `fileExtension` is an empty string, we're just using the label 'file'.
using the label 'file'. */}
*/} {getLangText('Download')} .{fileExtension || 'file'} <Glyphicon glyph="cloud-download" />
{getLangText('Download')} .{fileExtension || 'file'} <Glyphicon glyph="cloud-download" /> </a>
</a>
</span>
); );
} }
}); });
export default S3DownloadButton; export default S3DownloadButton;

View File

@ -14,9 +14,9 @@ let S3Fetcher = {
}, },
signUrl(key, title, artistName) { signUrl(key, title, artistName) {
return requests.get('sign_url_s3', { return requests.get('sign_url_s3', {
'artist_name': artistName,
key, key,
title title,
'artist_name': artistName
}); });
} }
}; };