B4J Question Error accessing file on remote computer

jmon

Well-Known Member
Licensed User
Longtime User
Hi,

I am trying to open set a jpg file to an imageView. The Jpg file is on a server (Windows), but I get an error:
B4X:
java.io.FileNotFoundException: file:\vfx-server-wds\WebServer\intranet\data_users\team1_jo.jpg (The filename, directory name, or volume label syntax is incorrect)

The path I am trying to access exists:
B4X:
\\vfx-server-wds\WebServer\intranet\data_users\team1_jo.jpg

This is my code:
B4X:
            img.SetImage(fx.LoadImageSample(File.GetUri("//vfx-server-wds/WebServer/intranet/data_users", ""), _
                RS.GetString("teams.team_name").ToLowerCase & "_" & RS.GetString("user.nick").ToLowerCase & ".jpg", 32, 32))
Can someone help me find what's wrong here?

Note: sorry I posted this question already in this thread, as I thought it was related to external file access.
 

jmon

Well-Known Member
Licensed User
Longtime User
Ok... I just need to remove "File.GetUri" and just write directly the path as string.

So why does this thread on external file access says that we should use "File.GetUri"
 
Upvote 0
Top