react-native-thumbnail icon indicating copy to clipboard operation
react-native-thumbnail copied to clipboard

Added options "saveToDir" and "uniqueNames" and removed peerDependencies

Open naxel opened this issue 7 years ago • 4 comments

https://github.com/phuochau/react-native-thumbnail/issues/13

naxel avatar Jan 16 '18 22:01 naxel

Added options "saveToDir" and "uniqueNames" (for using same images #3 )

//Example
let options = {
  saveToDir: '.app_thumbs', //default "/storage/emulated/0/thumb/"
  uniqueNames: false,// default "false", same names
};
const filePath = "/storage/emulated/0/DCIM/Camera/VID_20180116_202826.mp4";
RNThumbnail.get(filePath, options).then((result) => {
  console.log(filePath, result);
  /** result:
  {
    height: 320
    path:"file:///storage/emulated/0/DCIM/Camera/.app_thumbs/VID_20180116_202826.mp4.jpeg"
    width:240
  }
 */
});

naxel avatar Jan 17 '18 00:01 naxel

@naxel Thanks so much for making the change. Could you help to fix conflicts? And update the docs that these options only work on Android?

phuochau avatar Jan 17 '18 00:01 phuochau

@phuochau It's only for Android now. I'm not an Android developer, so the code may be messy. I think I can help you to fix conflicts.

naxel avatar Jan 17 '18 00:01 naxel

Any updates @naxel , I just updated the master branch

phuochau avatar Oct 14 '18 10:10 phuochau