pfroelicher

server path

Discussion created by pfroelicher on May 15, 2017
Latest reply on Jun 8, 2017 by jerrysalem

Hi

I try to run a script on server to generate a pdf file and store it in a container field, so users can se the report with a simple click instead of having to generate it each time.

I have heard, that in fms16 you can do that now in Server.. but the "insert pdf" command is still dimmed. So I tried Insert from URL, which work on server.

My script finds records, sorts them, sets $caminho to Get(TemporaryPath)$nameofmyfileDDMMYYHHMM, saves the .pdf and inserts from URL into a container field.

 

Thereby I observed that on a client machine the path (obtained with GET(TemporaryPath) to get the URL one has to substitute the name of the HD with file:///private/.

from this

/hd250gb/var/folders/ph/9ydk6vyn2237x0gbr792bzgc000101/T/S10/relmat12-05-2017h1642.pdf

get this.

file:///private/var/folders/ph/9ydk6vyn2237x0gbr792bzgc000101/T/S10/relmat12-05-2017h1151.pdf

Which was easy with the replace function.

On a client my script works fine.

But on the server the path becomes:

/server100gb/var/folders/cc/vj9msh_15mg7lxdql_wnfn600000gp/T/S10537/relmat15-05-2017h1736.pdf

And testing this in the browser on the Server machine I cannot access the file.

Where do I have to create the pdf to, so that I can read it into a container field and serve it to clients. Or how can I modify the script so it runs on server (or better still on clients and server).

txs

Pierre

Outcomes