AJAX upload times out
If you find that users on a slow connection, or with large files to upload, are experiencing a timeout message with the AJAX uploader, you can increase the length of time.
Use the snippet below in Add-Ons Ultimate to increase the default value of 30,000 ms (30 seconds) to a greater value:
| /** | |
| * Increase the AJAX upload timeout limit | |
| */ | |
| function prefix_pewc_dropzone_timeout( $timeout, $field_id ) { | |
| return 60000; // 1 minute | |
| } | |
| add_filter( 'pewc_dropzone_timeout', 'prefix_pewc_dropzone_timeout', 10, 2 ); |
Here’s how to add a snippet to WordPress.
Upload field missing upload button
It may be that your upload field is not working correctly. If you can’t see the upload icon in the center of the upload zone or it’s not possible to drag files into the zone, it’s possible that the JavaScript might be lazy loaded. This could be a result of your caching or optimization plugin.
In WP Rocket, you can fix this by adding dropzone.js to the exclusion lists for both “Load Javascript deferred” and “Delay JavaScript execution”.