nit: since this won't always be a preview blob, it might be simpler to just call it blob.

Also, consider saving the metadata here newMedia.metadata = metadata. Or just save the preview blob. Once the preview gallery code lands, the user will be able to delete photos and the thumbnail may need to be re-created in the future. Saving something here means that parseJPEGMetadata() won't be needed again to recreate the thumbnail.

Note also the patch from asuth that landed (or is landing) on master that will force newMedia.blob to be a file-backed blob instead of a memory backed blob.