Show torrent file name based on magnet URI

This commit is contained in:
Torjus
2018-07-30 11:37:51 +02:00
parent c908fa8855
commit 37f7af3778
3 changed files with 7 additions and 4 deletions
@@ -1,5 +1,6 @@
import React, { Component, Fragment } from 'react';
import { connect } from 'react-redux';
import magnet from 'magnet-uri';
import * as requestActions from '../../redux/requestActions';
import { saveAs } from 'file-saver/FileSaver';
import { client } from './FileSharing';
@@ -96,6 +97,8 @@ class FileChatEntry extends Component
<Fragment>
<p>A new file was shared.</p>
<p>{magnet.decode(this.props.message.file.magnet).dn}</p>
<button onClick={this.download}>
Download
</button>