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

Stream files to Google Drive, Dropbox or Mega.nz #1168

Closed
abhishek-raj opened this issue Aug 5, 2017 · 3 comments
Closed

Stream files to Google Drive, Dropbox or Mega.nz #1168

abhishek-raj opened this issue Aug 5, 2017 · 3 comments

Comments

@abhishek-raj
Copy link

@abhishek-raj abhishek-raj commented Aug 5, 2017

I was thinking is there a way to stream chunks of data to google drive or some other storage?

I was using web-torrent to download files to server and then download the files from the server directly as my university prevents P2P transfers but then the server just has about 500mb of hard drive space. So if it is possible to download chunks of data to googledrive and then retrieve it on the fly.

After reading most of the docs everywhere, I found out that I could implement a chunk-store for google drive but don't know much about chunk stores. Other possibilty is to pause the torrent and then create a stream to the files giving specific start and end bytes and store them to google drive but that will create a hassle if the server restarts which means then I will have to store states.

Is there some easier way?

@abhishek-raj

This comment has been minimized.

Copy link
Author

@abhishek-raj abhishek-raj commented Aug 5, 2017

I wanted to create something similar to this but using webtorrent.
https://github.com/jpillora/node-torrent-cloud

@abhishek-raj

This comment has been minimized.

Copy link
Author

@abhishek-raj abhishek-raj commented Aug 5, 2017

I think I can implement a chunk-store for google drive but can anyone help on what happens when the file is downloaded using the memory-chunk-store?

Like I can see how that works but how do I make sense of the chunks in the memory after it has been downloaded?

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 26, 2018

@abhishek-raj When you use memory-chunk-store, the entire torrent is stored in memory. You should ensure that you have enough free RAM to actually store the entire torrent, or you'll have problems.

Once a file is complete, you can access the raw data using file.createReadStream([opts]) or file.getBuffer(function callback (err, buffer) {}) and do whatever you want with it.

See the docs: https://webtorrent.io/docs

@feross feross closed this Apr 26, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 25, 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.