Support » Plugin: WordPress File Upload » Issue with simultaneous uploads

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author nickboss

    (@nickboss)

    Hi, what files are the users usually try to upload? Large ones?

    Regards

    Nickolas

    Most files are between 300KB and 2MB. Do you think that could be the problem?

    Plugin Author nickboss

    (@nickboss)

    No they are small, do you know if your website uses cache?

    Nickolas

    I don’t use a caching plugin. Is there one you’d recommend that would work well alongside your plugin? I was hesitant to add one. Thanks!

    Plugin Author nickboss

    (@nickboss)

    I was asking because caching plugin cause problems some times.

    When files fail, do they return an error or just stop uploading?

    Nickolas

    This is the error received: https://www.dropbox.com/s/n7sdulr52j2ki4j/OUTLOOK_2017-08-31_12-22-20.png?dl=0

    The form/file does not get submitted when this error happens.

    Thanks!
    Cliff

    Plugin Author nickboss

    (@nickboss)

    Unfortunately random failures are very hard to troubleshoot. One way is to log all uploads, wait until some failed uploads occur and then check the log for any clues about the source of error.

    I have created a script for such occasions. Are you using the Free or Pro version of the plugin (instructions change)?

    Nickolas

    Awesome! I’d love to help troubleshoot.

    I currently have the free version but have put in a request with my company to purchase the Pro version. Could I have instructions for both?

    Plugin Author nickboss

    (@nickboss)

    Yes, here is the script:

    if (!function_exists('wfu_after_upload_handler')) {
    	function wfu_after_upload_handler($changable_data, $additional_data) {
    		wfu_debug_log("PluginID: ".$additional_data["sid"]."\n");
    		wfu_debug_log("UniqueID: ".$additional_data["unique_id"]."\n");
    		foreach ( $additional_data["files"] as $file ) {
    			wfu_debug_log("  File: ".$file["original_filename"]."\n");
    			wfu_debug_log("    Upload Result: ".$file["upload_result"]."\n");
    			if ( $file["message"] != "" ) wfu_debug_log("    Error Message: ".$file["message"]."\n");
    			if ( $file["admin_messages"] != "" ) wfu_debug_log("    Admin Messages: ".$file["admin_messages"]."\n");
    			if ( count($file["user_data"]) > 0 ) wfu_debug_log("    Additional Data:\n");
    			foreach ( $file["user_data"] as $userdata ) wfu_debug_log("      ".$userdata["label"].": ".$userdata["value"]."\n");
    		}
    		wfu_debug_log("Session Dump 1st Level (partial):\n");
    		foreach ( $_SESSION as $item => $val ) {
    			if ( substr($item, 0, 8) != "filedata" && 
    				substr($item, 0, 13) != "wfu_shortcode" && 
    				substr($item, 0, 17) != "wfu_add_shortcode" && 
    				substr($item, 0, 17) != "wfu_check_refresh" && 
    				substr($item, 0, 21) !=  "wfu_upload_first_pass" &&
    			   	$item != "wfu_filepath_safe_storage" )
    				wfu_debug_log("  [".$item."]: ".$val."\n");
    		}
    		wfu_debug_log("POST Dump 1st Level:\n");
    		foreach ( $_POST as $item => $val ) wfu_debug_log("  [".$item."]: ".$val."\n");
    		wfu_debug_log("\n");
    		return $changable_data;
    	}
    	add_filter('wfu_after_upload', 'wfu_after_upload_handler', 10, 2);
    }

    In Free version you just put it at the end of functions.php file of your theme.

    In Pro version there is a special place in Dashboard area of the plugin for scripts, called Hooks. Open Hooks tab and add a new Hook. Give it any title you want. Put the above script in Code box. Then set Status to Active and Save.

    All upload attempts will be logged to /wp-content/debug_log.txt file. When you detect any problems, send the file to me for examination.

    Regards

    Nickolas

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Issue with simultaneous uploads’ is closed to new replies.