1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. AJAX upload times out
  1. Home
  2. Knowledge Base
  3. Field Types
  4. File Uploads
  5. AJAX upload times out
  1. Home
  2. Knowledge Base
  3. Troubleshooting
  4. AJAX upload times out

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 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.

Was this article helpful?

Related Articles