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

fix(android): add missing format field in CameraPhoto #1798

Merged
merged 1 commit into from
Jul 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ private void returnFileURI(PluginCall call, ExifWrapper exif, Bitmap bitmap, Uri
bis = new ByteArrayInputStream(bitmapOutputStream.toByteArray());
Uri newUri = saveTemporaryImage(bitmap, u, bis);
JSObject ret = new JSObject();
ret.put("format", "jpeg");
ret.put("exif", exif.toJson());
ret.put("path", newUri.toString());
ret.put("webPath", FileUtils.getPortablePath(getContext(), bridge.getLocalUrl(), newUri));
Expand Down Expand Up @@ -409,6 +410,7 @@ private void returnDataUrl(PluginCall call, ExifWrapper exif, ByteArrayOutputStr
String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);

JSObject data = new JSObject();
data.put("format", "jpeg");
data.put("dataUrl", "data:image/jpeg;base64," + encoded);
data.put("exif", exif.toJson());
call.resolve(data);
Expand All @@ -419,6 +421,7 @@ private void returnBase64(PluginCall call, ExifWrapper exif, ByteArrayOutputStre
String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);

JSObject data = new JSObject();
data.put("format", "jpeg");
data.put("base64String", encoded);
data.put("exif", exif.toJson());
call.resolve(data);
Expand Down