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

When seeding a file/folder from disk, don't perform extra copy to /tmp #357

Closed
Chocobozzz opened this issue Jun 12, 2015 · 5 comments · Fixed by #358
Closed

When seeding a file/folder from disk, don't perform extra copy to /tmp #357

Chocobozzz opened this issue Jun 12, 2015 · 5 comments · Fixed by #358

Comments

@Chocobozzz
Copy link
Contributor

@Chocobozzz Chocobozzz commented Jun 12, 2015

Hi !

If I want to seed a file from (just an example) /home/me/videos/awesome.webm I see that webtorrent copy it as /tmp/webtorrent/xxx/xxx.webm. I wanted to know if this was really needed, since the file is already on the disk.

This could be annoying with big videos (1Go), disk space would rapidly decrease and the seeding would take much time since the disk should copy 1Go before it.

Thanks :)

@ericwooley

This comment has been minimized.

Copy link
Contributor

@ericwooley ericwooley commented Jun 12, 2015

I'm sure feross can enlighten us, but I'll take a stab at the question. From my limited work with the file api, it's not easy to access data from the outside of the web sandbox (by that I mean not possible). So the options would be too keep the data in memory (hope you have a lot!) or write it to disk somewhere you can access.

@Chocobozzz

This comment has been minimized.

Copy link
Contributor Author

@Chocobozzz Chocobozzz commented Jun 12, 2015

Oh sorry, I forgot an important thing. It's with webtorrent in a node server (webtorrent-hybrid).

Of course in a browser I agree there is no many options.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jun 12, 2015

@Chocobozzz You're right, copying to /tmp is not really needed if you're seeding a file that you already have on disk. This is a bug!

PR welcome!

@feross feross changed the title Seed new file (string) from disk. Copy to /tmp really needed ? When seeding a file/folder from disk, don't perform extra copy to /tmp Jun 12, 2015
janza added a commit to janza/webtorrent that referenced this issue Jun 13, 2015
@feross feross closed this in #358 Jun 28, 2015
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jun 28, 2015

Released as 0.50.1, thanks to a PR from @janza 👍

@Chocobozzz

This comment has been minimized.

Copy link
Contributor Author

@Chocobozzz Chocobozzz commented Jun 28, 2015

Thanks guys !

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 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.

3 participants
You can’t perform that action at this time.