diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-10 15:15:04 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-10 15:15:04 -0700 |
commit | 83b04181da84d0456dfa02b8d52953eb3fd3d7d1 (patch) | |
tree | 49510d8a6d4be6aeed9a86816cffcbc82d66b09b /web/react/components/file_attachment.jsx | |
parent | 1108ac53063bedcfe00647fa0577e91cf60555de (diff) | |
parent | 927b474005b9e6c03f7385f4d1a06626dd0450e3 (diff) | |
download | chat-83b04181da84d0456dfa02b8d52953eb3fd3d7d1.tar.gz chat-83b04181da84d0456dfa02b8d52953eb3fd3d7d1.tar.bz2 chat-83b04181da84d0456dfa02b8d52953eb3fd3d7d1.zip |
merging
Diffstat (limited to 'web/react/components/file_attachment.jsx')
-rw-r--r-- | web/react/components/file_attachment.jsx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx index 78693df98..c9aa06a97 100644 --- a/web/react/components/file_attachment.jsx +++ b/web/react/components/file_attachment.jsx @@ -97,6 +97,7 @@ export default class FileAttachment extends React.Component { var filename = this.props.filename; var fileInfo = utils.splitFileLocation(filename); + var fileUrl = utils.getFileUrl(filename); var type = utils.getFileType(fileInfo.ext); var thumbnail; @@ -150,14 +151,25 @@ export default class FileAttachment extends React.Component { {thumbnail} </a> <div className='post-image__details'> - <div + <a + href={fileUrl} + download={filenameString} data-toggle='tooltip' title={filenameString} className='post-image__name' > {trimmedFilename} - </div> + </a> <div> + <a + href={fileUrl} + download={filenameString} + className='post-image__download' + > + <span + className='fa fa-download' + /> + </a> <span className='post-image__type'>{fileInfo.ext.toUpperCase()}</span> <span className='post-image__size'>{fileSizeString}</span> </div> |