Dim FD As FileDialog
.....
FD.FilePath = File.DirRootExternal ' also sets ChosenName to an emtpy string
'fd.ShowOnlyFolders = true
FD.FileFilter = ".pdf,.docx,.txt,.jpg,.jpeg" ' for example or ".jpg,.png" for multiple file types
If FD.Show("Attach File", "Yes","","No", Null) = DialogResponse.POSITIVE Then
edt_file.Text = FD.ChosenName
nome_file = FD.ChosenName
grandezzafile = File.Size(FD.FilePath, FD.ChosenName)
FTP.UploadFile(FD.FilePath, FD.ChosenName, False, "/public_html/XXXXX/fotoutenti/" & FD.ChosenName)
End If