SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to allow only certain users to download uploaded file

    I have a page in which i upload a circular & also select users who can view this page using multiple select dropdown box.
    Now how to display the uploaded file to selected users when they login and not to other users.
    Can anybody help.
    Thanks in advance.

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,196
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The easiest way would be to create a permissions table in your database and assign them to that specific permissions group then check it when they are viewing the uploaded files.

  3. #3
    SitePoint Guru
    Join Date
    Jan 2007
    Posts
    971
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you want to protect certain files from being downloaded, they can be stored above the root level. A php script would then be used to fetch the file, checking permissions first. IE: download.php?file=protected.doc

    The download file would send protected.doc to the browser.

    E


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •