Jump to content

Give access to other files than those in files\ folder


likemike

Recommended Posts

Hello!

I've tried to change the "FilesFolder" property of UniserverModule, because I want to give the user access to a picture directory which isn't located in the HyperServer-folder.

But when I use "FilesFolderURL" I always get the same result: "/m/files/". Is there any way to redirect the files/ path to any other directory on the server machine?

Best regards

Mike

Link to comment
Share on other sites

3 hours ago, likemike said:

Hello!

I've tried to change the "FilesFolder" property of UniserverModule, because I want to give the user access to a picture directory which isn't located in the HyperServer-folder.

But when I use "FilesFolderURL" I always get the same result: "/m/files/". Is there any way to redirect the files/ path to any other directory on the server machine?

Best regards

Mike

+1

Link to comment
Share on other sites

Until there is no better solution I have a dirty workaround:

For images I use:

UnimImage1.Picture.LoadFromFile(CompleteFilePathOfImage);

For PDF or video files I copy the file into the files\ directory before I try to open it:

CopyFile(PChar(CompleteFilePathOfImage), PChar(UniServerModule.FilesFolderPath+FileName), FALSE);
UnimPDFFrame1.PdfURL:=UniServerModule.FilesFolderURL+FileName;

Change CompleteFilePathOfImage and FileName respectively!

 

Link to comment
Share on other sites

×
×
  • Create New...