Giter Site home page Giter Site logo

Upload from CLI about kaput-cli HOT 7 CLOSED

davidchalifoux avatar davidchalifoux commented on June 3, 2024
Upload from CLI

from kaput-cli.

Comments (7)

Gex2501 avatar Gex2501 commented on June 3, 2024 1

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 '[email protected]' \
  -F 'filename=' \
  -F 'parent_id='

from kaput-cli.

davidchalifoux avatar davidchalifoux commented on June 3, 2024

This is not currently possible using only the Put.js library.

from kaput-cli.

Gex2501 avatar Gex2501 commented on June 3, 2024

Is it possible to upload a .torrent file to start the transfer?

from kaput-cli.

davidchalifoux avatar davidchalifoux commented on June 3, 2024

@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!

from kaput-cli.

Gex2501 avatar Gex2501 commented on June 3, 2024

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 '[email protected]' \
  -F 'filename=' \
  -F 'parent_id=0'

from kaput-cli.

davidchalifoux avatar davidchalifoux commented on June 3, 2024

@Gex2501 You're super close!

You just need an API token in the header:
Authorization: Bearer ${API_TOKEN}

Which I think looks like -H "Authorization: Bearer TOKEN_HERE" added to CURL.

from kaput-cli.

davidchalifoux avatar davidchalifoux commented on June 3, 2024

Added in v2.0.0!

from kaput-cli.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.