• Resolved Harry

    (@dibbyo456)


    I’m using filemask *.jpg,*jpeg,*.png,*.gif

    When I tried to install a plugin via uploading the zip file, the plugin installation keeps failing.

    Then I realized the plugin also moving .zip file to DO even I explicitly told it not to.

    in short filemask not working.

    PS: I’m using Store files only in the cloud and delete after successful upload.

    • This topic was modified 6 years, 7 months ago by Harry.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Harry

    (@dibbyo456)

    @keeross can I get a reply?

    Plugin Author keeross

    (@keeross)

    A fix is on its way

    Thread Starter Harry

    (@dibbyo456)

    @keeross Thank you so much. I almost lost hope..
    Thank you so much. ??

    Plugin Author keeross

    (@keeross)

    Can you test it? I have just uploaded a new version with a fix.

    Thread Starter Harry

    (@dibbyo456)

    Sure!
    Give me some minutes.

    Thread Starter Harry

    (@dibbyo456)

    @keeross Hi, the problem seems to be fixed. But I think instead of using blacklist, we should use whitelist. Because most of us would only try upload images or pdfs.

    I also getting this errors while trying to visiting attachments.

    Fatal error: Uncaught Error: Call to undefined function get_home_path() in /srv/users/serverpilot/apps/website/public/wp-content/plugins/do-spaces-sync/code.php:477 Stack trace: #0 /srv/users/serverpilot/apps/website/public/wp-includes/class-wp-hook.php(288): dos_attachment_url('https://assets....') #1 /srv/users/serverpilot/apps/website/public/wp-includes/plugin.php(203): WP_Hook->apply_filters('https://assets....', Array) #2 /srv/users/serverpilot/apps/website/public/wp-includes/post.php(5158): apply_filters('wp_get_attachme...', 'https://assets....', 1265) #3 /srv/users/serverpilot/apps/website/public/wp-content/plugins/wordpress-seo-premium/frontend/class-frontend.php(1418): wp_get_attachment_url(1265) #4 /srv/users/serverpilot/apps/website/public/wp-includes/class-wp-hook.php(286): WPSEO_Frontend->attachment_redirect('') #5 /srv/users/serverpilot/apps/website/public/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #6 /srv/users/serverpilot/apps/website/public/wp- in /srv/users/serverpilot/apps/website/public/wp-content/plugins/do-spaces-sync/code.php on line 477

    Plugin Author keeross

    (@keeross)

    Whitelisting is a breaking change, basically people upload image, music and video files to WP, sometimes pdf/doc files, so much more often ignoring functionality is needed.
    About an error, it is really weird, because the get_home_path function is core function.

    Thread Starter Harry

    (@dibbyo456)

    I just tested the plugin on a fresh wordpress install. I can still reproduce the issue.

    Thread Starter Harry

    (@dibbyo456)

    @keeross I don’t know what’s the root cause for this problem. But after googling for a while I found this. I’ve added this codes in the plugin’s code.php

    if ( !function_exists( 'get_home_path' ) )
    	require_once( dirname(__FILE__) . '/../../../wp-admin/includes/file.php' );

    that fixes the problem. I don’t know if it’s the proper way to do it but it works.

    • This reply was modified 6 years, 7 months ago by Harry.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Plugin also uploading .zip file even I am using filemask’ is closed to new replies.