Hi, I have a form with a input file. When it is sent I upload the file to media library. I want this file to be restricted to subscriber role, so it has no public access.
I have found this in database:
update_post_meta($attachment_id, ‘__wpdm_private’, 1);
update_post_meta( $attachment_id, ‘__wpdm_media_pass’, ”);
update_post_meta($attachment_id, ‘__wpdm_media_access’, [‘subscriber’]);
But it is still public accessible.
What more do I have to do to restrict it?
Thank you.