mirror of
https://github.com/status-im/react-native-cameraroll.git
synced 2025-02-19 21:18:20 +00:00
Use DCIM dir for saveToCameraRoll
This commit is contained in:
parent
900c53a3cb
commit
947f1b0dce
@ -127,14 +127,8 @@ public class CameraRollModule extends ReactContextBaseJavaModule {
|
|||||||
File source = new File(mUri.getPath());
|
File source = new File(mUri.getPath());
|
||||||
FileChannel input = null, output = null;
|
FileChannel input = null, output = null;
|
||||||
try {
|
try {
|
||||||
File environment;
|
File environment = Environment.getExternalStoragePublicDirectory(
|
||||||
if ("mov".equals(mOptions.getString("type"))) {
|
Environment.DIRECTORY_DCIM);
|
||||||
environment = Environment.getExternalStoragePublicDirectory(
|
|
||||||
Environment.DIRECTORY_MOVIES);
|
|
||||||
} else {
|
|
||||||
environment = Environment.getExternalStoragePublicDirectory(
|
|
||||||
Environment.DIRECTORY_PICTURES);
|
|
||||||
}
|
|
||||||
File exportDir;
|
File exportDir;
|
||||||
if (!"".equals(mOptions.getString("album"))) {
|
if (!"".equals(mOptions.getString("album"))) {
|
||||||
exportDir = new File(environment, mOptions.getString("album"));
|
exportDir = new File(environment, mOptions.getString("album"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user