Skip to content
This repository was archived by the owner on Sep 15, 2026. It is now read-only.
This repository was archived by the owner on Sep 15, 2026. It is now read-only.

media/upload does work for images but not with videos #124

Closed

Description

@faustoct1

this code works fine with images but doesn't with videos

url = await client.post("media/upload", { media_data: data })

{
  _headers: Headers {
    [Symbol(map)]: [Object: null prototype] {
      'cache-control': [Array],
      connection: [Array],
      'content-disposition': [Array],
      'content-encoding': [Array],
      'content-length': [Array],
      'content-type': [Array],
      date: [Array],
      expires: [Array],
      'last-modified': [Array],
      pragma: [Array],
      server: [Array],
      'set-cookie': [Array],
      status: [Array],
      'strict-transport-security': [Array],
      vary: [Array],
      'x-access-level': [Array],
      'x-connection-hash': [Array],
      'x-frame-options': [Array],
      'x-rate-limit-limit': [Array],
      'x-rate-limit-remaining': [Array],
      'x-rate-limit-reset': [Array],
      'x-response-time': [Array],
      'x-transaction': [Array],
      'x-tsa-request-body-time': [Array],
      'x-twitter-response-tags': [Array],
      'x-xss-protection': [Array]
    }
  },
  request: '/1.1/media/upload.json',
  error: 'media type unrecognized.'
}

Activity

  1. faustoct1 commented on Jul 18, 2020

    @faustoct1
    Author

    got something here

    client.get(...) => {"media_id":1284554329119236000,"media_id_string":"1284554329119236097","media_key":"7_1284554329119236097","size":1939232,"processing_info":{"state":"failed","progress_percent":100,"error":{"code":1,"name":"InvalidMedia","message":"file is invalid"}},"_headers":{}}

  2. ishkapoor2000 commented on Feb 16, 2022

    @ishkapoor2000

    How to get media_id_string ?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions