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

I can't use imageToBlob #2

Open
FauricioValencia opened this issue Aug 16, 2020 · 0 comments
Open

I can't use imageToBlob #2

FauricioValencia opened this issue Aug 16, 2020 · 0 comments

Comments

@FauricioValencia
Copy link

FauricioValencia commented Aug 16, 2020

I used this code:

const selectImage = async () => {
    const file = ImagePickerRN.showImagePicker((response) => {
      if (response.didCancel) {
        console.log('User cancelled image picker')
      } else if (response.error) {
        console.log('ImagePicker Error: ', response.error)
      } else if (response.customButton) {
        console.log('User tapped custom button: ', response.customButton)
      } else {
        const source = { uri: response.uri }
        console.log({ response })
        setImage(source)
        return response
        // You can also display the image using data:
        // const source = { uri: 'data:image/jpeg;base64,' + response.data };
      }
    })

    const blobFile = await imageToBlob(file)
    console.log({ blobFile })
    onValueChange(file)
  }

and console return me this

image

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

No branches or pull requests

1 participant