Replies: 1 comment
-
I know its been three years but in case you haven't figured it out here's the answer: Start by installing the Capacitor Community Media plugin: npm install @capacitor-community/media In your code, import the Media module: import { Media } from "@capacitor-community/media"; Here's how you can ensure an album exists and save an image to it within your App.jsx: const ensureDemoAlbum = async () => {
const savedFile = await Filesystem.writeFile({
Before saving images, make sure the album exists. Here's how you can create a "Media Demo Album" using a button in your CreateAlbum.jsx: import { Media } from '@capacitor-community/media';
Integrate the CreateAlbum component within your App.jsx to provide a user interface for album creation. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to save an image (or video) to the gallery so that the image can be accessed from other apps that use the devices gallery. How can I do this? This is what I've tried:
I'm aware that I can save an image to the gallery using the Camera plugin, but I don't want to take a picture I already have a picture that I'd like to save.
Directory.Data
just seems like the local private directory and anything saved there is not accessed from other apps, which is not what I would like.Beta Was this translation helpful? Give feedback.
All reactions