Skip to content

Complications with POST request #33

@Sandobaggu

Description

@Sandobaggu

Hello,

My colleagues and I are trying to upload videos with react-native-background-upload, but although we can see the progression of the file being uploaded, our API receives a request without the video file or any body.

Does your library supports sending requests with body? Is there a way to send a request with the videos on body instead of using path? Which key can we use to retrieve the video file on our API, if we’re adding the video file via ‘path’.

We are using react-native version 0.44.0 and testing on an iPhone device

Our options:

const uploadOptions = {
    url: REQUEST_URL,
    path: video.uri, 
    method: 'POST',
    headers: {
        ‘key’: ‘value’,
    },
    body: formData,
}

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