Hi Team,
I need the user to be able to browse for a file from any drive on the computer. The application should initially point to “My Document” folder but the user should be able to navigate to “My Computer” or “This PC” and locate the file on the other drives on the computer without me having to first list those drives in code.
I followed the support ticket in the link below but have not been successful, any help will be greatly appreciated.
https://wisej.com/support/question/openfiledialog-1?sort=oldest
Below is the code:
Dim ofd As New OpenFileDialog
ofd.Roots.Add(New FileSystemProvider(“C:\\”, “Images”))
ofd.ShowDialog()
Dim filPathx As String = System.IO.Path.GetDirectoryName(ofd.FileName)
Dim filNamex As String = System.IO.Path.GetFileName(ofd.FileName)
Dim filExtensionx As String = System.IO.Path.GetExtension(ofd.FileName)
Dim sourceFilePathx As String = filPathx & “\” & filNamex
pbxPicx.Image = Image.FromFile(ofd.FileName)
*I will need the file name, path and extension of the file.
pbxPicx is a picture box that should display the image.
Hi Nicholas
Sorry for the late answer
Sadly, browsers don’t let you browser a user’s computer and
the OpenFileDialog maps drive units on server, not user pc.
But for do your goal, there are three options
1) upload files using the Upload control or drag and drop a file (see docs online) and process it on server
2) user the https://www.nuget.org/packages/Wisej-3-ClientFileSystem extension which uses the browser’s file access api
The client file access api is documented on the mozilla web site.
3) contact sales for custom support, if our goal is more complex and is outside of our free support scope.
HTH
Paul
Hi Nicolas
In this support post you can find details about the same question
Also here you can see the documentation about it
Regards
Please login first to submit.