• Resolved danielmoorehbd

    (@danielmoorehbd)


    Hi,

    I uploaded a PDF file in the WP Media section, when I open it directly, I get this error:

    Warning: mime_content_type(): Can only process string or stream arguments in /wp-content/plugins/advanced-access-manager/application/Core/Media.php on line 137

    Any ideas what it means? Never came across it before and Google returns nothing!

    Kind Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter danielmoorehbd

    (@danielmoorehbd)

    I fixed the issue!

    I found that using the Hide My WordPress Plugin, this fiddles with the path on the front end…

    Solution was adding:
    RewriteCond %{REQUEST_URI} my-contents/(.*)$
    into htaccess, so it looks like this as a whole:

    # BEGIN AAM Media Access Control
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} -f
        RewriteCond %{REQUEST_URI} \.(pdf|doc|docx|ppt|pptx|pps|ppsx|odt|xls|xlsx|psd)$
        RewriteCond %{REQUEST_URI} wp-content/uploads/(.*)$
        RewriteCond %{REQUEST_URI} my-contents/(.*)$
        RewriteRule . /index.php?aam-media=1 [L]
    </IfModule>
    # END AAM Media Access Control

    New here? Read this: https://aamplugin.com/article/how-to-manage-access-to-the-wordpress-media-library

    cocacool

    (@cocacool)

    Hi,

    I have the same problem.
    I use Elementor and have a file in

    . /wp-content/uploads/elementor/thumbs/150px-Coat_of_arms_of_Berlin-ofi3z58ba0smvu00f7jufefe2cqb2z2rndy3dgnrpc.png

    that is not shown upon activation of the media protection.
    However the media protection for direct access to media files wors very well – no access being logged out, access being logged in.
    Only said file is NOT accessible being logged in.
    If I am going for the solution mentioned by Daniel Moore, all files become accessible again even if not logged in.
    I tried to add
    RewriteCond %{REQUEST_URI} my-contents/(.*)$
    as well as
    RewriteCond %{REQUEST_URI} wp-content/uploads/elementor/thumbs/(.*)$

    what am I doing wrong?
    thanks in advance for any suggestions.

    greetings

    Seb.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning: mime_content_type():’ is closed to new replies.