Skip to content

started

liukefu edited this page Jan 9, 2018 · 1 revision

Usage

use version

version >= 0.0.20

Import library

import ImagePicker from 'react-native-customized-image-picker';

Select from gallery

Call single image picker

ImagePicker.openPicker({
  
}).then(image => {
  console.log(image);
});

Call multiple image picker

ImagePicker.openPicker({
  multiple: true
}).then(images => {
  console.log(images);
});

Optional cleanup

Module is creating tmp images which are going to be cleaned up automatically somewhere in the future. If you want to force cleanup, you can use clean to clean all tmp files. Delete the cut, compression, and photographed pictures.

ImagePicker.clean().then(() => {
  console.log('removed all tmp images from tmp directory');
}).catch(e => {
  console.log(e);
});
Clone this wiki locally