• Hi, I can’t seem to get your plugin working.
    I am using WordPress 5.4.1
    I already have the paid plugin WP Media Folder 5.1.2

    Debug error logs look like this:
    Info : Ajax queue proceed request (queue length: 3)
    Info : Proceed queue ajax
    Info : Proceed queue synchronously
    Info : Max execution time is 1645570141.326
    Error : file is not int the upload folder C:\Website/web/app/uploads
    Error : file is not int the upload folder C:\Website/web/app/uploads
    Error : file is not int the upload folder C:\Website/web/app/uploads
    Info : Synchronous queue finished
    Info : Proceed queue asynchronously success

    I thought it may have been because I was using Bedrock
    https://roots.io/bedrock/
    And this changes the default upload directory, but I tested on a non-Bedrock site with a standard WordPress install and it does the same.

    Info : Proceed queue ajax
    Info : Proceed queue synchronously
    Info : Max execution time is 1645573723.171
    Error : file is not int the upload folder C:\Website-2/wp-content/uploads/2020/05
    Info : Synchronous queue finished
    Info : Proceed queue asynchronously success

    When I install your plugin I also see the new ‘File Path’ section when looking at an image’s details.
    And it says ‘The file is not in the allowed upload folder’.
    https://imgur.com/lJL5How

    So I can’t seem to get it to function at all.
    Any ideas?
    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author dbarrere

    (@dbarrere)

    Hi,

    Well, frankly I have never tested the plugin with a non default upload folder, but as I use core WordPress functions to get the file path, it should work.

    The thing I suspect is because of your Windows environment, system path separators are \ instead of / in linux env.
    Unfortunately I don’t have a Windows computer available to test.

    I will check the code and give you an update on it as soon as possible.

    Best regards

    Thread Starter pmascis

    (@pmascis)

    I’ve had some success with the regular WordPress install.
    The upload_url_path within wp_options was blank, so using this in function.php worked.
    update_option(‘upload_url_path’, ‘/wp-content/uploads’);

    I’m having a few quirks with the non standard path / Bedrock install, I’ll test more and document tomorrow, thanks!

    Plugin was great when it was working ??

    Plugin Author dbarrere

    (@dbarrere)

    I was checking the code and, yes it’s not related to Windows separator.
    In this case the path may be the issue.
    And if the upload_url_path option was not set, it could be a problem. If WordPress doesn’t use a default value when the code retrieves the upload folder.
    But I don’t know why it wouldn’t be defined though.

    The code retrieve the upload path via the WordPress function wp_upload_dir().
    This should be defined correctly be default.

    Please let me know what you find, I would be pleased to integrate any fix if needed for a next version.
    But to be honest, I won’t have time this week to build another test site with a non standard WordPress install I don’t know at all to make debug.

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error: File is not int the upload folder’ is closed to new replies.