Jump to content

mhmda

uniGUI Subscriber
  • Posts

    1141
  • Joined

  • Last visited

  • Days Won

    157

Posts posted by mhmda

  1. 1 minute ago, irigsoft said:

    The problem is that User2 receives a file from User1

    In my example:

    1. I have 3 users and they pay to receive Video1, Video2, Video3 files

    2. If I send url1 to user1 to video1, so user2 and user3 will not pay for this file, the url is the same

    How to protect Video1 to download user2 and user3 without paying

    Then you have know the session id for the right user if a user with no rights to access this video then block the request. 

  2. Just now, irigsoft said:

    If I change Server root: root to mynewroot, what problems can wait ?

    Then just copy your files (images, css, js...) to the new path: mynewroot\files\.....

    After changing and when you use for example a url for image: 'files/images/copy.png' the server will search for the image inside the new path: mynewroot\files\images\copy.png

    You don't need to change anything in your code just copy needed files (folders) to the new root: mynewroot folder 🙂

    • Like 1
  3. Hi,

    We don't expose important files and .fr3 (fastreport) to the web, we keep them in folder that doesn't exist in the 'root' of ServerModule and for generating report we create a temp. file for current user using the helper function of the Unigui:

    ExportFileName := ServerModule.NewCacheFileUrl(False, ExportType, '', '', AUrl, True);

    This will create a random file with a specific extension then we forward this to FastReport:

    frxPDFExport.FileName       := ExportFileName;//<--- url for the temp file

     

    And for displaying the report to the end user you just use the AUrl.

     

    Also all attached files that been uploaded by the user are saved the same way in a folder that isn't exposed to the web and when needed we use the same technique above (yes another copy of the same file, and we keep the source file safe).

×
×
  • Create New...