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

Refactor the add torrent to channel endpoint #2284

Closed
devos50 opened this issue Jun 13, 2016 · 1 comment · Fixed by #7726
Closed

Refactor the add torrent to channel endpoint #2284

devos50 opened this issue Jun 13, 2016 · 1 comment · Fixed by #7726

Comments

@devos50
Copy link
Contributor

devos50 commented Jun 13, 2016

I would like to propose two changes to the add torrent to channel endpoint:

  • We can easily pass the torrent file data using a HTTP multipart request instead of passing the base64 data of the torrent file. I've already done this here: devos50@2d0efe1. After that, we can easily add torrents to your channel using something like:
curl -X PUT -F "file=@/path/to/my/file.torrent" -F "additional_data=bla"
  • Currently, when adding a torrent to your channel using a url/magnet, we are making a PUT request to mychannel/torrents/{theurl}. This is problematic since I currently assume that torrents are identified by their infohash and not by their url. I think it might be better to add an extra field to the request when adding a torrent file to your channel, specifying the source (file/url/magnet).

@brussee what are your thoughts on this?

@devos50 devos50 changed the title Refactor the add torrent to channel endpoint to not require base64 data Refactor the add torrent to channel endpoint Jun 13, 2016
@whirm whirm added this to the New GUI milestone Jun 13, 2016
@devos50 devos50 modified the milestones: Backlog, New GUI Jan 11, 2017
@ichorid ichorid modified the milestones: Backlog, V7.4: P3 + nested channels Aug 5, 2019
@ichorid
Copy link
Contributor

ichorid commented Aug 27, 2019

While working on this, please note that GigaChannel now supposes that objects are uniquely identified by pk+id keypair. This means that now we are truly REST compliant in a sense that one could POST the same infohash twice and get two new objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants