I have a webpage that allows users to upload a Excel Workbook to my database and I was wondering how do I handle the uploaded file. This is how I create my form
<?php echo $this->UiForm->create(null, array( 'type' => 'file', 'action' => 'processSpreadsheet', )); ?> <?php echo $this->UiForm->input('Spreadsheet', array( 'label' => '', 'rel'=>'tooltip', 'title' => 'Choose a completed workbook template from your local system to import.', 'data-trigger'=>'hover', 'type' => 'file', )); ?> <?php echo $this->UiForm->end(array('label' =>'Upload' ,'class'=>'btn', 'id'=>'upload-doc' )); ?>
With that said, I have already wrote a function that will read the workbook. I just need to know how to handle the file from the view. Any input would be greatly appreciated! Thanks!