0

For quite some time, I use Phonegap for our app that takes pictures and finally sends them to the server. Until recently, we used Phonegap 1.4 and everything went well.

Now I first switched to 2.2 then 2.5, but am always having problems in accessing the picture after it has been taken. The camera is responding with the file URI, but when I try to access the file, I always get an error 5.

fileSystem.root.getFile(file, {create: false}, ideaCommitCopyFileEntryToLocal, failOpenFile);

Now I am looking for advice, what is going wrong. Any ideas?

Chagemei
  • 286
  • 6
  • 14
  • Have you tried resolving the file URI to file name, check this [answer](http://stackoverflow.com/questions/11754299/phonegap-android-unable-to-upload-image-using-filetransfer/14220608#14220608) – Davor Zlotrg Jul 31 '13 at 13:58
  • Where are you saving this file? is it in any directory? probably you might want to get the directory first and then get the file:// Get the data directory, creating it if it doesn't exist. dataDir = fileSystem.root.getDirectory("data", {create: true}); // Create the lock file, if and only if it doesn't exist. lockFile = dataDir.getFile("lockfile.txt", {create: true, exclusive: true}); – Sheetal Aug 02 '13 at 08:43

0 Answers0