OnMultiFileUploadCustom() публичный статический Метод

Handle multi file upload without dying.
public static OnMultiFileUploadCustom ( string $p_path ) : void
$p_path string
Результат void
Пример #1
0
 public function uploadAction()
 {
     global $Campsite;
     $auth = Zend_Auth::getInstance();
     $userId = $auth->getIdentity();
     $_FILES['file']['name'] = preg_replace('/[^\\w\\._]+/', '', $_FILES['file']['name']);
     $mimeType = $_FILES['file']['type'];
     $type = explode('/', $mimeType);
     if ($type[0] == 'image') {
         $file = Plupload::OnMultiFileUploadCustom($Campsite['IMAGE_DIRECTORY']);
         $image = Image::ProcessFile($_FILES['file']['name'], $_FILES['file']['name'], $userId, array('Source' => 'feedback', 'Status' => 'Unapproved', 'Date' => date('Y-m-d')));
         $this->view->response = $image->getImageId();
     } else {
         if ($type[1] == 'pdf') {
             $attachment = new Attachment();
             $attachment->makeDirectories();
             $file = Plupload::OnMultiFileUploadCustom($attachment->getStorageLocation());
             $document = Attachment::ProcessFile($_FILES['file']['name'], $_FILES['file']['name'], $userId, array('Source' => 'feedback', 'Status' => 'Unapproved'));
             $this->view->response = $document->getAttachmentId();
         }
     }
 }