Fix image uploading error reporting