You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next, update the `savePicture()` method. When running on mobile, set `filepath` to the result of the `writeFile()` operation - `savedFile.uri`. When setting the `webviewPath`, use the special `Capacitor.convertFileSrc()` method ([details on the File Protocol](../../core-concepts/webview.md#file-protocol)). To use this method, we'll need to import Capacitor into `photo.service.ts`.
71
71
72
-
```tsx
72
+
```ts
73
73
import { Capacitor } from'@capacitor/core';
74
74
```
75
75
76
76
Then update `savePicture()` to look like the following:
77
77
78
78
```ts
79
-
// CHANGE: Update `loadSaved` method.
80
-
publicasyncloadSaved() {
81
-
// Retrieve cached photo array data
82
-
const { value } =awaitPreferences.get({ key: this.PHOTO_STORAGE });
0 commit comments