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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 ); |