Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisekelley committed Jun 17, 2021
1 parent 3472d06 commit 6817ecd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions input/tangy-photo-capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,7 @@ export class TangyPhotoCapture extends PolymerElement {
async acceptPhoto() {
// Convert blob to base64 string
const arrayBuffer = await this.blob.arrayBuffer()
// convert arrayBuffer to a string
// const abString = String.fromCharCode.apply(null, new Uint8Array(arrayBuffer))
// base64 encode the string
// const b64 = window.btoa(unescape(encodeURIComponent(abString)));
// convert arrayBuffer to a base64String
const base64String = window.btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)));
// turn it into a data:image
const nudata = 'data:image/jpeg;base64,' + base64String
Expand Down

0 comments on commit 6817ecd

Please sign in to comment.