Hi,
when receiving a file image/* from content chooser, how can I know the original extension (gif,jpg or png, which are all valid images) ? It's needed because when receiving an image from that, is common to copy to a directory where the app could manipulate and to do this it's needed to know the extension... for example, if I copy a original .gif to .jpg the original image will be corrupted. Something like this (for filetypes gif and jpg for example...)
But... fiel_extension of content chooser is unknown... what to do in this case?
when receiving a file image/* from content chooser, how can I know the original extension (gif,jpg or png, which are all valid images) ? It's needed because when receiving an image from that, is common to copy to a directory where the app could manipulate and to do this it's needed to know the extension... for example, if I copy a original .gif to .jpg the original image will be corrupted. Something like this (for filetypes gif and jpg for example...)
B4X:
Chooser1_Result (Success As Boolean, Dir As String, FileName As String) 'extension image/*
if chooser1.success then
file_extension = ?????
if file_extension = "jpg" then
file.copy(dir,filename,file.dirinternal,"temp.jpg")
else
if file_extension = "gif" then
file.copy(dir,filename,file.dirinternal,"temp.gif")
end if
end if
....
end if
But... fiel_extension of content chooser is unknown... what to do in this case?