RobinBobin / react-native-google-drive-api-wrapper

This wrapper facilitates the use of the Google Drive API in React Native projects.
110 stars 43 forks source link

Need a simple image upload and show image in the app Example. #97

Closed shubhadeep29 closed 7 months ago

shubhadeep29 commented 10 months ago

Hi @RobinBobin, First of all Thank you for this very useful library.

I need an example with a simple image upload and showing the image in the app.

I want to know the standard process because I can see there is confusion like uploading binary/base64 images and different processes of reading that image.

I have successfully set up the app with gdrive access and able to access the files according to -> https://github.com/RobinBobin/gdrivetest/blob/master/src/Files.tsx

Please Help with an Example.

Thanks

RobinBobin commented 10 months ago

1) Uploading. If you need to save your data as binary, use binary uploads. If you need to save as base64 use base64 uploads. Have a look at the sample project for both approaches. The link to the project is in the docs. If the code in the sample doesn't seem to work for you, give more details, stating clearly what exactly you did and what result you got.

2) showing the image in the app. As far as I know you can use 2 approaches when using dynamic (not statically bundled) images: base64 and uri. Please, have a look at the official docs or google.

RobinBobin commented 7 months ago

Closed as inactive.