forked from jsnbuchanan/crowd-funder-for-time-pwa
chore(deps): Add Capacitor camera and filesystem plugins
- Add @capacitor/camera@6.0.0 for cross-platform photo capture - Add @capacitor/filesystem@6.0.0 for file system operations - Maintain compatibility with existing Capacitor core v6.2.1 These plugins enable native camera access and file system operations for the Capacitor platform implementation.
This commit is contained in:
@@ -32,7 +32,7 @@ export class WebPlatformService implements PlatformService {
|
||||
const blob = await this.processImageFile(file);
|
||||
resolve({
|
||||
blob,
|
||||
fileName: file.name || "photo.jpg"
|
||||
fileName: file.name || "photo.jpg",
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error("Error processing camera image:", error);
|
||||
@@ -60,7 +60,7 @@ export class WebPlatformService implements PlatformService {
|
||||
const blob = await this.processImageFile(file);
|
||||
resolve({
|
||||
blob,
|
||||
fileName: file.name || "photo.jpg"
|
||||
fileName: file.name || "photo.jpg",
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error("Error processing picked image:", error);
|
||||
@@ -82,9 +82,9 @@ export class WebPlatformService implements PlatformService {
|
||||
const dataUrl = event.target?.result as string;
|
||||
// Convert to blob to ensure consistent format
|
||||
fetch(dataUrl)
|
||||
.then(res => res.blob())
|
||||
.then(blob => resolve(blob))
|
||||
.catch(error => {
|
||||
.then((res) => res.blob())
|
||||
.then((blob) => resolve(blob))
|
||||
.catch((error) => {
|
||||
logger.error("Error converting data URL to blob:", error);
|
||||
reject(error);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user