Jump to content

Can I read and write files out of my project?


55143681

Recommended Posts

2023-11-13_173713.png.4ab9c441c647125f6cc665fd7c81f7fd.png

 

As you see ,My project is in "d:\aaatest\debug",

In my project's home path,

there is a folder "filesHome",

my project can  read and write all files within that,

Now ,I want to read and write a folder out of my project's home path,

such as "E:\jdsfajk\dljsafl",

Can I do that?

Link to comment
Share on other sites

Just now, 55143681 said:

exe,standalone,use hyperserver.

See the image:

I have two windows server,names server-a and server-b,every server run a unigui standlone server,

the program is web.exe,the two server read/write the same oracle rac database,

and I want the two server can read/write the same files Store(NAS channel),

that is :

Server-a and server-b have their web home "d:\",and they can ask  the same file path "e:\filesHome"

How to do that?

2023-11-14_081528.png.fdf054b2f5d854a0f3f1db9c965e5da2.png

Link to comment
Share on other sites

22 hours ago, Farshad Mohajeri said:

It depends on account your app is running. There is no difference between a unigui app & other Delphi apps.

For Windows Service and IIS ISAPI check the account which is used to run your app. For example, normally it is Local System for Windows Services.

As you say,my web.exe can read and write the files everywhere,

but,if I need download the file with URL,

then I will meet a missing file error.

Such as UniPdfFrame->pdfFile  and Session->sendfile().

How to read and write "e:\\abc\\test.pd" not within my web home path?

2023-11-15_154255.png.da9209448beb4ec1e45a5e0421d85e37.png

Link to comment
Share on other sites

4 minutes ago, Farshad Mohajeri said:

You must put PDF file either under application files folder or application cache folder.

Please see our PDFViewer demo.

Thanks,Every One.

1.Set ServerModule->filesFolder=e:\fileHome\

2.UniSession->SendFile(UniServerModule()->FilesFolder+"aaa\\test.pdf");  works well.

3.UniPDFFrame1->PdfURL=UniServerModule()->FilesFolderURL+"aaa\\test.pdf";   works well.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...