capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

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

Open ajlif opened this issue 1 year ago • 0 comments

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

ajlif avatar May 31 '24 07:05 ajlif