Skip to content

Problems Uploading Images #18

@Nikiforos86

Description

@Nikiforos86

Hello, i am trying to upload an image to Twitter using your library.
i did read your solution here but it does not work.
Having some more read into your code i understand that only the old method from here is supported and not the new one, but even so i could not upload an image.

I tried to implement the chunked method on my own, and started by doing something like
client.rest.post('media/upload', {command:"INIT", total_bytes:"70456", media_type:"image/jpeg"}).then((resolve) => { alert('media/upload '+ JSON.stringify(resolve)) console.log('done'); }).catch(console.error);
but nothing is returned. Still, if i use an alert after response.text() on raw.js of the included libraries i do get the response.

I am fairly new to React-Native (and JS) so, could ypu please provide a better example, or a way to actually retrieve the response there and chain it with the APPEND and FINISH methods?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions