separate download url from preview url

This commit is contained in:
or-else
2018-06-06 16:41:16 +03:00
parent 9c507ba631
commit 499bf1ee14
3 changed files with 18 additions and 6 deletions
+2 -2
View File
@@ -3176,7 +3176,7 @@
if (this.props.mimeType === Drafty.getContentType()) {
Drafty.attachments(content, function(att, i) {
attachments.push(<Message.Attachment
filename={att.name} blobUrl={Drafty.getBlobUrl(att)}
filename={att.name} downloadUrl={Drafty.getDownloadUrl(att)}
size={Drafty.getEntitySize(att)} key={i} />);
}, this);
content = React.createElement('span', null, Drafty.format(content, formatter, this));
@@ -3283,7 +3283,7 @@
{this.props.uploader ?
<FileUploadProgress progress={this.props.progress} />
:
<div><a href={this.props.blobUrl} download={this.props.filename}>
<div><a href={this.props.downloadUrl} download={this.props.filename}>
<i className="material-icons">file_download</i> save
</a></div>
}