Web development basic and advance tutorial, php basic tutorial, laravel basic tutorial, React Native tutorial

Friday, March 26, 2021

React Native Image Upload before resize with node js

0 comments

React Native Image Upload before resizing with node js

be fore start image upload you need to set up and install as I am going to explain

npm install --save react-native-permissions
this need to install for resize image
npm install --save react-native-image-resizer@1.1.0
  "react-native-image-resizer""^1.1.0",

open your AndroidManifest.xml
directory : android>app>src>main>AndroidManifest.xml
part 1
<uses-permission android:name=”android.permission.INTERNET” />
<uses-permission android:name=”android.permission.READ_EXTERNAL_STORAGE” />
<uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE” />
<uses-permission android:name=”android.permission.VIBRATE”/>


I was able to get react-native-image-picker working again by adding android:requestLegacyExternalStorage="true" to my <application ... > tag in AndroidManifest.xml.

if you see the permission is not all gallery you need to setup 

 android:allowBackup="false"
      android:requestLegacyExternalStorage="true"
 android:usesCleartextTraffic="true" 

 <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:requestLegacyExternalStorage="true"
      android:largeHeap="true"
      android:theme="@style/AppTheme">


 import ImageResizer from 'react-native-image-resizer';

/npm install react-native-image-resizer --save


gradle.properties android folder

if you found any issue.

check the FLIPPER_VERSION=0.52.1

No comments:

Post a Comment