Think that's most of the php stuff done for this part of the file upload. Pass the failure info to javascript.