• In the limit_upload function, which is registered with the wp_handle_upload_prefilter filter, the following code is present:

    add_filter( 'wp_handle_upload_prefilter', array( $this, 'limit_upload' ), 10, 1 );
    ......

    if ( ! is_admin() ) {
    if ( ! empty( $post) && 'ticket' !== $post->post_type && $submission !== $post->ID ) {
    return $file;
    }
    }

    The current logic only checks for is_admin(). Consequently, for file uploads made via the REST API, the function doesn’t check if the request is a ticket submission. As a result, only file types specified by Awesome Support are allowed, and all other uploads fail.

    Please ensure that future versions also check whether the request is from the REST API.

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jawada

    (@jawada)

    Hi @082net

    Thank you for bringing this to our attention and for sharing the detailed explanation. We’ve forwarded this to our development team for further investigation. They will review the logic around REST API uploads to ensure it’s handled properly in future versions.

    We’ll keep you updated as soon as we have more information.

    Best regards,

    Plugin Author Jawada

    (@jawada)

    Hi @082net ,

    Thank you for reporting this. The issue has been fixed in Awesome Support version 6.3.6. Please update to the latest version and let us know if you need any further assistance.

    Best Regards

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Issue with wp_handle_upload_prefilter and REST API Uploads’ is closed to new replies.