Hello, I am using @nativescript/imagepicker to select multiple images on android.
I would like to only keep the images which have .jpg, .jpeg, and .png extensions.
I am checking the URI using selection[0].android, but the result is:
content://com.android.providers.media.documents/document/image%3A52
It contains the image name, but not the file extension.
How can I get the file extension using imagepicker?
In @nativescript/imagepicker 2.0, it now returns more information about your selection. You can get extension by doing
selection[0].filename.split('.').pop() for example.
Hello, I am using @nativescript/imagepicker to select multiple images on android. I would like to only keep the images which have .jpg, .jpeg, and .png extensions.
I am checking the URI using selection[0].android, but the result is:
content://com.android.providers.media.documents/document/image%3A52
It contains the image name, but not the file extension.How can I get the file extension using imagepicker?
This is my implementaiton:
I am using:
How to get the file extension?