File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,15 +105,15 @@ export class PhotoService {
105105 }
106106 else {
107107 // Fetch the photo, read as a blob, then convert to base64 format
108- const response = await fetch ( cameraPhoto . webPath ) ;
108+ const response = await fetch ( cameraPhoto . webPath ! ) ;
109109 const blob = await response . blob ( ) ;
110110
111111 return await this . convertBlobToBase64 ( blob ) as string ;
112112 }
113113 }
114114
115115 // Retrieve the photo metadata based on the platform the app is running on
116- private async getPhotoFile ( cameraPhoto , fileName ) {
116+ private async getPhotoFile ( cameraPhoto : CameraPhoto , fileName : string ) {
117117 if ( this . platform . is ( 'hybrid' ) ) {
118118 // Get the new, complete filepath of the photo saved on filesystem
119119 const fileUri = await Filesystem . getUri ( {
@@ -157,7 +157,7 @@ export class PhotoService {
157157 } ) ;
158158 }
159159
160- convertBlobToBase64 = blob => new Promise ( ( resolve , reject ) => {
160+ convertBlobToBase64 = ( blob : Blob ) => new Promise ( ( resolve , reject ) => {
161161 const reader = new FileReader ;
162162 reader . onerror = reject ;
163163 reader . onload = ( ) => {
@@ -167,7 +167,7 @@ export class PhotoService {
167167 } ) ;
168168}
169169
170- class Photo {
170+ interface Photo {
171171 filepath : string ;
172172 webviewPath : string ;
173173 base64 ?: string ;
You can’t perform that action at this time.
0 commit comments