File Uploads on Custom WordPress Feature
-
Overview of the Website’s Features
Our WordPress site includes a custom functionality where users:- Select a fabric.
- Upload artwork files (JPEG, PNG, or TIFF).
- Edit or adjust the uploaded artwork using a custom artboard tool.
- Submit the final artwork to the client for print and complete payment.
The upload functionality is a core feature and relies on AJAX requests to handle file uploads.
The Problem
When the CleanTalk Anti-Spam plugin is enabled, the upload functionality is blocked. Specifically:- The AJAX request to
/wp-admin/admin-ajax.phpreturns a 403 Forbidden error, preventing the file upload. - Related POST requests, such as those to
/wp-json/, also appear to be blocked.
Disabling CleanTalk resolves the issue, allowing uploads to work as expected.
Fix Attempted
We attempted to resolve the issue by whitelisting the relevant endpoints:/wp-admin/admin-ajax.php/wp-json/
These were added under Exclusions > URL Exclusions, as a comma-separated list and as individual lines. However, CleanTalk returned the following validation error:
Validate Settings: URL Exclusions is not valid: "/wp-admin/admin-ajax.php /wp-json/*"Request for Guidance
We would appreciate your assistance in understanding how to:- Properly configure CleanTalk to exclude our custom upload functionality from being blocked.
- Identify any specific settings or rules within CleanTalk that may cause this behaviour.
- Ensure compatibility with AJAX and REST API endpoints necessary for file uploads.
If logs or additional information are required, we are happy to provide them.
The page I need help with: [log in to see the link]
The topic ‘File Uploads on Custom WordPress Feature’ is closed to new replies.