Open naxel opened 6 years ago
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 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 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.
Any updates @naxel , I just updated the master branch
https://github.com/phuochau/react-native-thumbnail/issues/13