I would like to upload files to specific users. Here is the twist. I want to upload a specific file like an image or PDF file to only one user, and make sure other registered users cannot access this page. Kind of like a client page, where only they can see their files.

Edited by WorldFallz - moved to appropriate forum.

Comments

px’s picture

That's a multipart problem. First, you should decide whether to use the core Upload module or CCK Filefield (I recommend the later, since I never tried this with the core module). Next, you have to settle for a node access restriction module. You got several choices here. Organic groups might be worth having a look at. It's likely an overkill, but quite handy, once users want to share files among each other.

The last thing to take into consideration is, that you cannot simply upload your files to $DOCUMENTROOT/sites/default/files and use a public filesystem, as this allows everyone, knowing the URL for a file to bypass Drupal's access control mechanismn. On the other hand, you cannot simply switch to a private filesystem either without seriously crippeling website performance. If using a private filesystem is not an option, you could check this out:

http://www.onyxbits.de/content/drupal-and-problem-protecting-uploaded-files

dbeall’s picture

I am thinking to set up a 'page view' that will list a certain type of file using filters and user ID arguments and show it to the user with user ID arguments. Set up the view to only show for the logged in user.
I have not done this exact task before, but this would be my approach id it comes up