+
+ public function process(&$data) {
+ $upload = null;
+ if ($this->getValue("geom_upload")) {
+ $file = $this->geom_upload;
+ $upload = $file->getDestination() . DIRECTORY_SEPARATOR . $file->getValue();
+
+ if (!isset($data["geom_data"]) || !$data["geom_data"]) {
+ if (!file_exists($upload)) {
+ throw new Zend_Exception();
+ }
+ if (!@filesize($upload)) {
+ throw new Syj_Exception_InvalidGeomUpload();
+ }
+ $content = @file_get_contents ($upload);
+ if ($content == false) {
+ throw new Zend_Exception();
+ }
+ $data['geom_data'] = $content;
+ }
+ @unlink ($upload);
+ } else if (isset($_FILES['geom_upload']) and ($_FILES['geom_upload']['error']) == UPLOAD_ERR_INI_SIZE) {
+ throw new Syj_Exception_ToolargeGeomUpload();
+ } else {
+ $this->removeElement("geom_upload");
+ }
+ return $this;
+ }
+