EverythingMe / ffos-notes

Notes App for FirefoxOS
5 stars 21 forks source link

Cannot pick an image #5

Open fzzzy opened 11 years ago

fzzzy commented 11 years ago

The code looks for a url, but the activity now returns a blob.

In common.js, in actionPhoto:

                if (!act.result.url) return;

The act.result object now looks like:

{"type": "image/jpeg", "blob", blob_obj}

Therefore even though the image is picked successfully, the early-exit is hit because there is no url property of the result, and thus nothing happens.

Also, the "reopenApp" function does not appear to be required -- Removing it makes no difference, once the image is picked the notes app is loaded even without the reopenApp code.

evyatron commented 11 years ago

re the blob- how do I go about converting it to a proper image? I've tried a FileReader approach I found, but once I call the readAsDataURL method, the browser crashes.