-
Notifications
You must be signed in to change notification settings - Fork 7
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
Upload from CLI #6
Comments
This is not currently possible using only the Put.js library. |
Is it possible to upload a .torrent file to start the transfer? |
@Gex2501 Good news, I'm actually 95% done with completely rewriting this software and I already have file uploading working. My goal is to have v2.0 released this weekend! |
That's fantastic! What I'm really looking for a simple one line curl command to add torrent transfers. I've been reading over the API for hours and I'm just not sure how to do it. I got the following from the API but where do I put my token so the command is authenticated? curl -X 'POST' \
'https://upload.put.io/v2/files/upload' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@TotallyLegalFile.torrent' \
-F 'filename=' \
-F 'parent_id=0' |
@Gex2501 You're super close! You just need an API token in the header: Which I think looks like |
Thank you so much! I spent hours trying to figure this out! This worked for me... curl -X 'POST' \
'https://upload.put.io/v2/files/upload' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer XXXXXXXTOKENXXXXXXXX' \
-F 'file=@TotallyLegitFile.torrent' \
-F 'filename=' \
-F 'parent_id=' |
Added in v2.0.0! |
It'd be nice to be able to also upload files to Put from the CLI.
The text was updated successfully, but these errors were encountered: