17
Views
3
Comments
[Camera Plugin] How to get original file name?
Question
camera-plugin
Mobile icon
Forge asset by OutSystems
Application Type
Mobile

We are using plugin to add information to support cases and it is useful to have original file name in case user claims that he uploaded specific image. With filename we could check if mentioned picture was indeed uploaded to the system.
There is a filename in an URI but it seems that format can be changed depending on iOS version and Android
file:///var/mobile/Media/PhotoData/Mutations/DCIM/133APPLE/IMG_3769/Adjustments/FullSizeRender.heic
If it is currently not possible it would be great to have this feature in future.
Thank you

2019-04-09 00-57-55
carl ruhle

Hi @Mykola (Nick) Tkachenko ,

would it be possible to use regular expression to filter the filename?

You could filter using this (not tested yet) expression .*(\/IMG_.*\/)Adjustment*

If not possible to use regular expression, use string functions to find the start of IMG and the same thing for /Adjustments.

From that you know where to start and the total number of characters. 

Hope it helps you,  regards 

2021-05-05 13-05-18
Mykola (Nick) Tkachenko

Yes we can use regular expressions however our concern is that this string seems to be mutable depending on iOS or android version. 

2019-04-09 00-57-55
carl ruhle

@Mykola (Nick) Tkachenko ,

you absolutely right, in that case, use two regular expressions one for each type of operating system. On each system I guess that they will use the same string method, so it will be "easy" to get the original file name.

Best of luck, let us know how to going

Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.