PhrotonX
Member
I've been trying to obtain a file selected from a ContentChooser, but I do not have any idea on how I could get such file based on a Uri.
B4X:
Private Sub btnAddAttachment_Click
Private filepicker As ContentChooser
filepicker.Initialize("filepicker")
filepicker.Show("*/*", "Choose file")
End Sub
Private Sub filepicker_Result (Success As Boolean, Dir As String, FileName As String)
If Success Then
' will definitely not work.
File.Copy(Dir, FileName, File.DirInternal, FileName)
Else
MsgboxAsync("Unable to retrieve attachment", "Error")
End If
End Sub
End Sub