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

feat: Provide mime type for images from camera

Open aragilar opened this issue 3 years ago • 1 comments

Feature Request

Plugin

  • Camera

Description

Currently the format property is set to 'png', 'jpeg' or 'gif', however usually we want to deal with mimetypes (e.g. to pass to the Blob/File constructor). The absence of this means users need to remember to always prepend 'image/' to format. Whilst this isn't a major issue, it is a subtle one, and given the current state encourages hard coding the 'image/' which could cause issues in the future if say video support was added, it would be nice if there was a property (e.g. mimetype) which contained the correct mimetype for the image.

Platform(s)

All

Preferred Solution

Add a mimetype property to all results from the camera plugin.

aragilar avatar Feb 07 '22 01:02 aragilar

Any update?

josuelmm avatar May 18 '22 17:05 josuelmm

We need this as well. Would be nice to have :)

de-dan avatar Oct 25 '22 19:10 de-dan