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

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

Closed
faustoct1 opened this issue Jul 18, 2020 · 2 comments
Closed

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

faustoct1 opened this issue Jul 18, 2020 · 2 comments

Comments

@faustoct1
Copy link

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.'
}

@faustoct1
Copy link
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":{}}

@ishkapoor2000
Copy link

How to get media_id_string ?

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

No branches or pull requests

2 participants