I’m sending a path String to a Windows host via URLConnection and I want it to look for a file inside the “C:\ProgramData\Avatars” folder and it works fine.
Now I want to store the Avatars folder on a different drive, so I have set up a Shortcut to the new folder as “C:\ProgramData\Avatars.lnk”, but Windows won’t resolve this. I can’t use FolderItem.ChildAt(Avatars.lnk) because it’s being executed on a different computer.
Is there a workaround to place Shortcuts inside a FolderItem path?
My problem is that I’m getting the host to run an SQL command to return the Avatar PNG from a file using the ReadBlobMBS:
SQLCommand = "SELECT id, PreferredName, HEX(ReadBlobMBS(null, """ + Session.BaseLocationAvatars + "\" + """ || SUBSTR(""0000000000"" || CAST(id AS TEXT) || "".png"", -14))) AS AvatarPicture FROM Users" 'retrieves the Avatar from a file!
I’m not sure how WindowsShortCutMBS will help me as I already have the Shortcut. I could get the server to see the SQL command and do a custom extract, but I lose the one line SQL call. I’ll check out using a Symbolic Link.
My Windows host in London has my home NAS mounted via SMB (via MountainDuck). Using a symbolic link means my WebApp has essentially unlimited file space (32 TB for £1500), which would be prohibitively expensive if I rented that much space. It is slower, but not much since the files are small and MountainDuck does intelligent caching.
PS I renamed the symbolic link file I created called ‘Link’ to ‘Avatars’.