I was trying to figure out a Yii way to handle file upload. The regular single file upload is well taken care of by Form and CFileUpload, however when I try to implement a multiple file upload using CMultiFileUpload and CUploadedFile, things become ugly.
I started with the simplest way, no form required, I have a view like
in controller, I use $_FILES['uploadfile'] to get the uploaded file array, which is fine. however, I couldn't find a way to pass to CUploadFile, which has only getInstance () and getInstanceByName() motheds, none of them seems fit the situation here. ( getInstance () only works with form, while getInstanceByName() seems only works with single upload).
I am not sure if I miss sth there, so any advice is welcome.
PS.: From I what I have learned, I think there is a misleading instruction in the CMultiFileUpload doc http://www.yiiframew...MultiFileUpload.
Quote:
Quote
actually, you can only access uploaded file information via $_FILES['inputfiled_name'], NOT $_FILES[widget-id].

Help

This topic is locked















