Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Info #951

Closed
rafaelleru opened this issue Oct 17, 2016 · 6 comments
Closed

Info #951

rafaelleru opened this issue Oct 17, 2016 · 6 comments

Comments

@rafaelleru
Copy link

@rafaelleru rafaelleru commented Oct 17, 2016

I'm trying to load a .torrent file from my desktop in a app make with electron, but when I add the .torrent file to appp y Only have the option to save the file, and I don't know how to fix it.

Also the dragDrop function give me an error on start that say:

Uncaught TypeError: Cannot read property 'addEventListener' of null

Can anyone hel me?¿

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Oct 17, 2016

It sounds like you're using Electron. If you don't set up drop handlers correctly, then the default browser behavior is to just save the file, which is what you're seeing.

I recommend reading the drag-drop docs more closely. It looks like you're not passing a real DOM node.

@feross feross closed this Oct 17, 2016
@rafaelleru

This comment has been minimized.

Copy link
Author

@rafaelleru rafaelleru commented Oct 17, 2016

Where I can found more help to set up drop handlers? I can't find much help in docs.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Oct 17, 2016

Have you tried the code in the "Creating a new torrent and seed it (in the browser)" example on this page: https://webtorrent.io/intro

@rafaelleru

This comment has been minimized.

Copy link
Author

@rafaelleru rafaelleru commented Oct 17, 2016

yes but didn't work. Myn actual code look like:

dragDrop(document.getElementById("draganddrop"), function(file){ console.log(file); torrentID = file; addTorrent(torrentID); })

before I pass only 'draganddrop' as object, it's my div to drag files, but never show me other option more that save the file draged, and I want to add the torrent to the client via addTorrent function.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Oct 18, 2016

I'm sorry, I don't understand what you're asking.

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.