From 623e390cac177e50e3781f3b5a75b08df53b6aa4 Mon Sep 17 00:00:00 2001 From: Chandra Nandan Date: Sat, 3 Jun 2023 01:12:33 +0530 Subject: [PATCH 1/3] docs(angular):updated component photo service (#2986) --- docs/angular/your-first-app/5-adding-mobile.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/angular/your-first-app/5-adding-mobile.md b/docs/angular/your-first-app/5-adding-mobile.md index 844b87d723d..034db22e59f 100644 --- a/docs/angular/your-first-app/5-adding-mobile.md +++ b/docs/angular/your-first-app/5-adding-mobile.md @@ -35,10 +35,12 @@ First, we’ll update the photo saving functionality to support mobile. In the ` ```tsx private async readAsBase64(photo: Photo) { // "hybrid" will detect Cordova or Capacitor + const fileName = new Date().getTime() + '.jpeg'; + if (this.platform.is('hybrid')) { // Read the file into base64 format const file = await Filesystem.readFile({ - path: photo.path + path: fileName }); return file.data; From 2840d1f34fb284fbad6943891f703401cd4b36bf Mon Sep 17 00:00:00 2001 From: Chandra Nandan Date: Tue, 6 Jun 2023 23:57:44 +0530 Subject: [PATCH 2/3] docs(angular):changed component photo service (#2986) changed photo.path --> photo.path! --- docs/angular/your-first-app/5-adding-mobile.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/angular/your-first-app/5-adding-mobile.md b/docs/angular/your-first-app/5-adding-mobile.md index 034db22e59f..58ee0b88b6b 100644 --- a/docs/angular/your-first-app/5-adding-mobile.md +++ b/docs/angular/your-first-app/5-adding-mobile.md @@ -35,12 +35,11 @@ First, we’ll update the photo saving functionality to support mobile. In the ` ```tsx private async readAsBase64(photo: Photo) { // "hybrid" will detect Cordova or Capacitor - const fileName = new Date().getTime() + '.jpeg'; if (this.platform.is('hybrid')) { // Read the file into base64 format const file = await Filesystem.readFile({ - path: fileName + path: photo.path! }); return file.data; From 8450274aac39e5bf2b8a43920eedb1e93a324359 Mon Sep 17 00:00:00 2001 From: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com> Date: Tue, 6 Jun 2023 13:34:47 -0500 Subject: [PATCH 3/3] remove extra newline --- docs/angular/your-first-app/5-adding-mobile.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/angular/your-first-app/5-adding-mobile.md b/docs/angular/your-first-app/5-adding-mobile.md index 58ee0b88b6b..dc2ababc706 100644 --- a/docs/angular/your-first-app/5-adding-mobile.md +++ b/docs/angular/your-first-app/5-adding-mobile.md @@ -35,7 +35,6 @@ First, we’ll update the photo saving functionality to support mobile. In the ` ```tsx private async readAsBase64(photo: Photo) { // "hybrid" will detect Cordova or Capacitor - if (this.platform.is('hybrid')) { // Read the file into base64 format const file = await Filesystem.readFile({