Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Camera Plugin] prevent upload Gif and png files in android/ios #2121

Open
ajlif opened this issue May 31, 2024 · 0 comments
Open

[Camera Plugin] prevent upload Gif and png files in android/ios #2121

ajlif opened this issue May 31, 2024 · 0 comments

Comments

@ajlif
Copy link

ajlif commented May 31, 2024

Bug Report

Plugin(s)

@capacitor/camera": "5.0.8"

Capacitor Version

@capacitor/core": "5.4.2"

Platform(s)

Android
iOS

Current Behavior

i want to prevent the upload of gif file in android/and ios, but Camera.getPhoto always returns a jpeg file even if i choose a gif file.

    const image = await Camera.getPhoto({
      quality: 70,
      resultType: CameraResultType.DataUrl, // i tried with CameraResultType.Base64 and CameraResultType.DataUrl
      source
    });

Expected Behavior

  • allow the upload of another format and keep the extension(not convert to jpeg automatically)
    or
  • allow the user to prevent the upload of some files extension like gif and png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants