Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Undefined on cancel, uploadProgress, downloadProgress when wrapping fetch on RN 0.44 #370

@jjdp

Description

@jjdp

The object keys are there yet they are undefined when using the wrapped version. I am on RN 0.44 and rnfb 0.10.5. It is working fine though on rnfb fetch. using android simulator (does it matter)?

const Fetch = RNFetchBlob.polyfill.Fetch
window.fetch = new Fetch({}).build()

also how do you do formData on the rnfb fetch implementation, since I cant access the functions using the wrapper.

const formData = new FormData();
formData.append('key', folder + fileName);
formData.append('acl', acl);
formData.append('Content-Type', mime);
formData.append('X-Amz-Credential', x_amz_credential);
formData.append('X-Amz-Algorithm', 'AWS4-HMAC-SHA256');
formData.append('X-Amz-Date', date);
formData.append('Policy', base64Policy);
formData.append('X-Amz-Signature', signature);
formData.append('file', file);

fetch(url, {
    method : 'POST',
    body : formData
  });

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions