facebook

Using window.localStorage for media : CLOSED

  1. MobiOne Archive
  2.  > 
  3. Feedback & Suggestions
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #348582 Reply

    Pauldivaniii
    Member

    I have an application that is basically a appraisal type app. Right now I use window.localStorage to store the descriptive information about the appraisal (the stuff the user types in) by saving my appraisal object to local storage. Using a naming convention I can easily go back through all the appraisals, pull up the stored object and display saved appraisals.

    I also allow users to take photos and videos during the appraisal process which right now I am storing as the media files in the PERSISTEN local file system. This has turned out to be a very cumbersome way to go with all the asynchronous calls. And right now I am stuck when I try to send the files contents to my web service because the “window.resolveLocalFileSystemURI(fileURI, gotFileEntry, fail);” call is not working correctly and I can’t retrieve the file. Neither the gotFileEntry or fail methods get called.
    I put an alert to display the file URI (“file///var/mobile/Applications/5B1387AC-28CE-46A5-A83D-B91BD7376708/Documents/LOENotepad/Case_14a6d3e4-f008-42de-e4ef-e334e964a808/Subjects/Subject0/DLPhoto.jpg”, for example. I see the alert but the debug alerts in the gotFileEntry and fail never happen indicating to me that nothing is happening.

    I also have every function wrapped in a try-catch block and the catch alert is not firing either.

    Oh and I can only do this from the phone itself because the simulator will not let me use the PERMANENT local file system.

    It would be a little hard to send in a sample.

    #348584 Reply

    Pauldivaniii
    Member

    OK My bad. I had two methods named gotFileEntry (in two different source files) and the other one was getting called. Renamed the one in this thread to gotMediaFileEntry() and now it’s working.

    You can close this.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Using window.localStorage for media : CLOSED

You must be logged in to post in the forum log in