Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect path returned for saved photo #249

Open
3 tasks done
calculusdev opened this issue May 10, 2022 · 4 comments
Open
3 tasks done

Incorrect path returned for saved photo #249

calculusdev opened this issue May 10, 2022 · 4 comments

Comments

@calculusdev
Copy link

Bug Report

Problem

Launch the camera to capture a photo; take the photo; examine the opject returned. The fullPath property of the returned object is something like file:///storage/emulated/0/Pictures/1652174370741.jpg, while the image file is actually saved to something like file:///storage/emulated/0/DCIM/Camera/IMG_20220510_101151.jpg.

What is expected to happen?

The correct file path is returned for the newly-created file.

What does actually happen?

An incorrect file path is returned. Although the photo is saved to disk, there is no way to identify it from the information returned.

Information

The video capture works fine. The fullPath property of the returned object is like file:///storage/emulated/0/DCIM/Camera/VID_20220510_101151.mp4, and that's the actual path to the saved file.

At least one other person has mentioned a permissions problem causing problems with accessing the file from the information returned. I don't believe this is anything to do with permissions, given that the image file actually saves, and it works fine for video files.

(I can't try audio - I get a "No Activity found the handle Audio Capture" error.)

Environment, Platform, Device

Nokia 7.2
Android 11

Version information

Cordova Android 10.1.2
Media capture plugin versions 3.0.3 and 4.0.0-dev (I've not investigated video behaviour in 3.0.3).
File plugin versions 6.0.2 (for 3.0.3) and 7.0.0 (for 4.0.0-dev)
Awesome Cordova plugins wrapper version 5.39.1

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@diegolaisocialcities
Copy link

diegolaisocialcities commented May 12, 2022

I have the same problems as you, also the single MediaFile has a field named "localURL" which will be usefull but it is not accessible for some reason.

The Audio issue is also annoying.

I'm trying to convert the MediaFile into a Blob but most of the data is wrong.

@calculusdev
Copy link
Author

I have the same problems as you, also the single MediaFile has a field named "localURL" which will be usefull but it is not accessible for some reason.

This will be a problem with the awesome-cordova-plugin wrapper, rather than this project. I spotted it too, but it's still got the wrong filename for the photo.

@apolon23
Copy link

apolon23 commented Apr 9, 2023

Have someone resolve the problem? I have similar issue on Lenovo tab10. Cordova android 11

@ashwinrkjain
Copy link

Resolved the issue by removing the check for "checkForDuplicateImage", in onImageActivityResult

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

No branches or pull requests

4 participants