Restrict uploads content view only admin user

I have created new website and users are uploaded their documents into wp-uploads/documents/user_name folder. The file path will show like this https://example/wp-content/uploads/documents/example/MP-final.pdf. Now that file is public i want to protect those files from public access. Those file only view and download for admin users only. If the admin is logged in then only admin…

Details