Fix error when downloading your own files
parent
b3c45d004b
commit
1686e3603f
|
|
@ -4,11 +4,11 @@ import { shareFiles } from './index';
|
||||||
|
|
||||||
export const configureDragDrop = () =>
|
export const configureDragDrop = () =>
|
||||||
{
|
{
|
||||||
dragDrop('body', async(files) => await shareFiles(files));
|
dragDrop('body', async(files) => await shareFiles(files));
|
||||||
};
|
};
|
||||||
|
|
||||||
export const HoldingOverlay = () => (
|
export const HoldingOverlay = () => (
|
||||||
<div id='holding-overlay'>
|
<div id='holding-overlay'>
|
||||||
Drop files here to share them
|
Drop files here to share them
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
@ -80,7 +80,7 @@ class FileEntry extends Component
|
||||||
|
|
||||||
const magnetURI = this.props.data.file.magnet;
|
const magnetURI = this.props.data.file.magnet;
|
||||||
|
|
||||||
const existingTorrent = client.get(magnet);
|
const existingTorrent = client.get(magnetURI);
|
||||||
|
|
||||||
if (existingTorrent)
|
if (existingTorrent)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import ReactTooltip from 'react-tooltip';
|
import ReactTooltip from 'react-tooltip';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
@ -18,7 +18,7 @@ import Draggable from 'react-draggable';
|
||||||
import { idle } from '../utils';
|
import { idle } from '../utils';
|
||||||
import Sidebar from './Sidebar';
|
import Sidebar from './Sidebar';
|
||||||
import Filmstrip from './Filmstrip';
|
import Filmstrip from './Filmstrip';
|
||||||
import { configureDragDrop, HoldingOverlay } from './FileSharing/DragDropSharing';
|
import { configureDragDrop, HoldingOverlay } from './FileSharing/DragDropSharing';
|
||||||
|
|
||||||
configureDragDrop();
|
configureDragDrop();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue