[Plugin: NextGEN Gallery] Invalid upload. Error Code : 3
-
Hopefully this helps others who may run into this problem. I see there was a post about this a year ago with no response.
Problem
When attempting to upload multiple files using the flash uploader (ie. plupload), after the first file every subsequent file would return the error and fail.“Invalid upload. Error Code : 3”
Observation
Without going into the nitty-gritty details, essentially the browser is using the same connection (keepalives) for subsequent uploads which causes the files to be rejected (UPLOAD_ERR_PARTIAL).Solution
Implicitly send the ‘Connection: close’ header. Tells the browser not to reuse the connection for the next request (in this case, upload).patch
Essentially, addheader('Connection: close');to nextgen-gallery/admin/upload.php.diff --git a/wp-content/plugins/nextgen-gallery/admin/upload.php b/wp-content/plugins/nextgen-gallery/admin/upload.php index c8ba083..88edd05 100644 --- a/wp-content/plugins/nextgen-gallery/admin/upload.php +++ b/wp-content/plugins/nextgen-gallery/admin/upload.php @@ -23,6 +23,7 @@ unset($current_user); require_once(ABSPATH . '/wp-admin/admin.php'); header('Content-Type: text/plain; charset=' . get_option('blog_charset')); +header('Connection: close'); //check for correct capability if ( !is_user_logged_in() )
The topic ‘[Plugin: NextGEN Gallery] Invalid upload. Error Code : 3’ is closed to new replies.