AnyScreen and CSIDL Folders is C:\fakepath

Not sure what one should expect, but under AnyScreen HTML5, this is not what I expected for the desktop path when selecting a file: C:\fakepath134921630435125414

Small hand coded demo is attached if anyone is interested.

AnyScreenFile.zip (2.0 KB)

It’s Browser Security. Below post may be of help.

On Tue, Apr 27 2021 12:07 pm, Graham Dawson said:

eg run FILEDIALOG and select a file and example return string is
c:\fakepath281211619542774092\AdvancedTopicsReferenceGuide.pdf
real path is c:\Clarion11\docs\AdvancedTopicsReferenceGuide.pdf

same thing with
FILEDIALOGA, AnyScreen:FileDialog and AnyScreen:FileDialoga
all return 'fakepath’s

Returning a folder just doesn’t work at all.
Same results on both local IDE test and server 1.2 test.

On Tue, Apr 27 2021 1:01 pm, Marko Golem said:

Browser can’t return full path for a file, that is restriction (security) from a browser.

If you use the returned path on sequent fileupload it will work correctly. This
path returned from browser acts as “id” of the file.

If you want more functionalities and access more resources on client pc (then
the browser allows) you can use provided AnyService.

1 Like

Very helpful. Reading up on sequent fileupload is likely what I need next.

See your PTSS 43235 as I’ve added a zipped working solution as below…

AnyScreen:Exists is what you need to call not EXISTS - and you need to have AnyService working on the client for it to work.

WorkingAnyScreenExists

Thanks again, Graham. Obviously, I missed this in the docs and should have checked them again before creating that example. The actual app code will of course need much more work in order to have the file upload, no doubt starting with the display of C:\fakepath…

Hi Douglas,
You don’t need to worry about the FakePath stuff when using Upload as Marko said on the AnyScreen newsgroup…

Browser can’t return full path for a file, that is restriction (security) from
a browser.
If you use the returned path on sequent fileupload it will work correctly. This
path returned from browser acts as “id” of the file.

I understood that part, but I still need to display something for the user that confirms what file was selected - perhaps just a filename will be enough.

As for the now twice quoted term “sequent fileupload” by Marko, I remain a bit confused. Would of course be nice to have access to the AnyScreen newsgroup in order to read myself.

He just means on (sub)sequent use of FileUpload you don’t need to worry about converting the FakePath into something real.
Bit like the strings you get using GetURL - both FakePath and the ‘hash’ returned by GetURL represent the true path and AnyScreen internally knows what that is.

I wish Clarion-Software was still around with it’s Read-Only duplication of the newsgroups :slightly_frowning_face:

Any rumours of the next AnyScreen fix release?

Not at the moment, no.

Invoke your customer in good standing power. Start circulating some.