Instead use the question model, and directly search for file upload questions in the survey:

Question::model()->findAllByAttributes(array(
'sid' => surveyid,
'type' => fileuploadquestiontype
));