mirror of
https://github.com/zoriya/flood.git
synced 2026-05-25 16:29:12 +00:00
Allow uploading torrent files, finally
This commit is contained in:
@@ -65,10 +65,10 @@ export default class AddTorrents extends React.Component {
|
||||
content: <AddTorrentsByURL />,
|
||||
label: 'By URL'
|
||||
},
|
||||
// 'by-file': {
|
||||
// content: <AddTorrentsByFile />,
|
||||
// label: 'By File'
|
||||
// }
|
||||
'by-file': {
|
||||
content: <AddTorrentsByFile />,
|
||||
label: 'By File'
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -123,6 +123,8 @@ export default class AddTorrents extends React.Component {
|
||||
fileData.append('torrents', file);
|
||||
});
|
||||
|
||||
fileData.append('destination', this.state.destination);
|
||||
|
||||
TorrentActions.addTorrentsByFiles(fileData, this.state.destination);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,13 @@ export default class AddTorrents extends React.Component {
|
||||
}
|
||||
|
||||
onLatestTorrentLocationChange() {
|
||||
this.setState({destination: UIStore.getLatestTorrentLocation()});
|
||||
let destination = UIStore.getLatestTorrentLocation();
|
||||
|
||||
if (this.props.onChange) {
|
||||
this.props.onChange(destination);
|
||||
}
|
||||
|
||||
this.setState({destination});
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user