Giter Site home page Giter Site logo

Comments (3)

Furry avatar Furry commented on August 17, 2024

I'll work on this issue both tonight & tomorrow.

The current plan is to use Fluent-FFMPEG to Trim videos exceeding the max length down automatically, downloading the direct url of the post if need be.

from byte-api.

possibly-a-man avatar possibly-a-man commented on August 17, 2024

update I got it working and most of what I said initially was wrong lmao but here are actually the steps simplified for future reference:

Step 1:
POST to /upload

// may also wanna be using user agent headers
 headers: {
      'Content-Type': 'application/json',
      Authorization: '<your token>'
    }

payload: {
    contentType: 'video/mp4'
  }

returns data with an uploadID and uploadURL

Step 2:

PUT to that uploadURL

 headers: {
      'Content-Type': 'video/mp4'
    }

// payload is just an mp4 file, 5MB limit, seems to also have min length limit but unsure exactly.

Step 3:

POST to /post

 headers: {
      'Content-Type': 'application/json',
      Authorization: '<your token>'
    }

payload:{
    category: '<any category on byte>',
    videoUploadID :'<uploadID from step 1>' ,
    thumbUploadID: '<uploadID from step 1>',
    caption: '<your caption>'
  }

that will return a video aka post object & should let you know if successful

credit to mix and his examples which basically showed the way.

from byte-api.

possibly-a-man avatar possibly-a-man commented on August 17, 2024

Was added in 340a8a8

from byte-api.

Related Issues (9)

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.