You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to validate selected files, it is common to check that the file is not too large. From camera we might not have much control over this, but from the photo gallery it's possible to select a large saved image.
Platform(s)
iOS, Android, Web
Preferred Solution
Add a 'size' field on the return object
Alternatives
Could be appended the exif object, but given that is not very well defined to begin with, I think it's better to have a separate field.
Additional Context
The text was updated successfully, but these errors were encountered:
The returned object already contains the file (base64 encoded). So, couldn't you just use that for the size of the file? If you need exact byte size you could decode it.
The returned object might contain the file, base64 encoded, depending on what CameraResultType you pass in the call. It might also just be the path or a webpath, and you would need to use the file API to read the file, before continuing.
Yes, i could read the file from the drive afterwards, but reading the file an extra time just to ensure the size seems unnecessary, and in the plugin we already have the size handy.
Another solution might be to always return the base64, but that must have been decided against for some reason...
Feature Request
Plugin
Camera
Description
In order to validate selected files, it is common to check that the file is not too large. From camera we might not have much control over this, but from the photo gallery it's possible to select a large saved image.
Platform(s)
iOS, Android, Web
Preferred Solution
Add a 'size' field on the return object
Alternatives
Could be appended the exif object, but given that is not very well defined to begin with, I think it's better to have a separate field.
Additional Context
The text was updated successfully, but these errors were encountered: