switch ($_FILES['Filedata']['error'])<br />{<br /> case 0:<br /> $msg = "No Error"; // comment this out if you don't want a message to appear on success.<br /> break;<br /> case 1:<br /> $msg = "The file is bigger than this PHP installation allows";<br /> break;<br /> case 2:<br /> $msg = "The file is bigger than this form allows";<br /> break;<br /> case 3:<br /> $msg = "Only part of the file was uploaded";<br /> break;<br /> case 4:<br /> $msg = "No file was uploaded";<br /> break;<br /> case 6:<br /> $msg = "Missing a temporary folder";<br /> break;<br /> case 7:<br /> $msg = "Failed to write file to disk";<br /> break;<br /> case 8:<br /> $msg = "File upload stopped by extension";<br /> break;<br /> default:<br /> $msg = "unknown error ".$_FILES['Filedata']['error'];<br /> break;<br />}<br />If ($msg)<br /> $stringData = "Error: ".$_FILES['Filedata']['error']." Error Info: ".$msg;<br />else<br /> $stringData = "1"; // This is required for onComplete to fire on Mac OSX<br />echo $stringData;