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

Support for iOS assets-library:// files #43

Closed
smartt opened this issue Jul 6, 2016 · 2 comments
Closed

Support for iOS assets-library:// files #43

smartt opened this issue Jul 6, 2016 · 2 comments

Comments

@smartt
Copy link
Contributor

smartt commented Jul 6, 2016

It's unclear from the docs whether or not this library can be used to upload images from an iOS user's camera roll. The React Native camera roll API returns file URIs like, assets-library://asset/asset.JPG?id=1234-5678-ABCDE-3210&ext=JPG. Should I be able to use RNFetchBlob.wrap() on such a URI, like:

RNFetchBlob.fetch('POST', 'http://www.example.com/upload-form', {
    Authorization : "Bearer access-token",
    'Content-Type' : 'multipart/form-data',
  }, [
    // append field data from file path
    {
      name : 'avatar',
      filename : 'avatar.png',
      data: RNFetchBlob.wrap("assets-library://asset/asset.JPG?id=1234-5678-ABCDE-3210&ext=JPG")
    }
...
@wkh237 wkh237 added this to the v0.7.0 milestone Jul 7, 2016
@wkh237 wkh237 added the feature label Jul 7, 2016
@wkh237
Copy link
Owner

wkh237 commented Jul 7, 2016

@smartt , thank you for giving suggestion and use case. I'm already working on accessing assets, but there's quite a difference between Android and iOS. I will add this requirement to our 0.7.0 milestone.

@wkh237 wkh237 self-assigned this Jul 7, 2016
wkh237 added a commit that referenced this issue Jul 7, 2016
wkh237 added a commit that referenced this issue Jul 7, 2016
wkh237 added a commit that referenced this issue Jul 7, 2016
@wkh237 wkh237 removed this from the v0.7.0 milestone Jul 8, 2016
@wkh237
Copy link
Owner

wkh237 commented Jul 9, 2016

Hi @smartt , I've released 0.6.2 which implemented this feature, please check if it work as expected, thank you 😏

@wkh237 wkh237 closed this as completed Jul 20, 2016
julian-becker pushed a commit to julian-becker/react-native-fetch-blob that referenced this issue Mar 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants