• Hi, I’ve been looking at plugins, php or other codes that would allow me to assign media or folders on our server to users or user roles without using shortcodes. The the folders would auto show up on an assigned page. We had planned on using WP-Client but we had issue with the files part of it.

    Anyways, it is even possible to assign folders to users or user roles? I’ve looked into groups, communities, file managers, front end display, etc… I’m starting to thing what I need to do is impossible.

    Thank you
    Kim

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Finding plugins to do what you want can be difficult. But if you are willing to custom code something, virtually anything is possible. This includes folders assigned to users. Anything the uses wp_handle_upload() (like the media library) can alter where a uploaded file is stored by overriding where it is moved to from the PHP temp folder. This is done with the ‘pre_move_uploaded_file’ filter. The callback can move the file to anywhere that’s writable on the server.

    The ‘wp_handle_upload’ filter should also be used to reflect where the file was actually moved to. The page which displays media in a particular folder could query for all attachments which reside in that folder and output the results.

Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to assign media folders?’ is closed to new replies.