Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

naxel
Copy link

@naxel naxel commented Jan 16, 2018

#13

naxel added 3 commits January 9, 2018 16:34
Added options "saveToDir" and "uniqueNames" (for using same images phuochau#3 )
```javascript
//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 naxel changed the title Removed peerDependencies Added options "saveToDir" and "uniqueNames" and removed peerDependencies Jan 17, 2018
@naxel
Copy link
Author

naxel commented Jan 17, 2018

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
  }
 */
});

@phuochau
Copy link
Owner

phuochau commented Jan 17, 2018

@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?

@naxel
Copy link
Author

naxel commented Jan 17, 2018

@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.

@phuochau
Copy link
Owner

Any updates @naxel , I just updated the master branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants