| 12345678910111213141516171819202122232425262728 |
- <?php
- /**
- * 会议相关
- * 请求地址如:http://oa.test/api.php?m=openmeet&a=test&openkey=fee5efd3a93ca5c6a85b679cde60faa2
- */
- class openupfileClassAction extends openapiAction
- {
- public function testAction() {
- $str = $this->postdata;
- return json_encode($str);
- }
- public function upfileAction()
- {
- if(!$_FILES)exit('sorry!');
- $upimg = c('upfile');
- $maxsize= (int)$this->get('maxsize', 5);
- $uptype = $this->get('uptype', '*');
- $thumbnail = $this->get('thumbnail');
- $upimg->initupfile($uptype, ''.UPDIR.'|'.date('Y-m').'', $maxsize);
- $upses = $upimg->up('file');
- $arr = c('down')->uploadback($upses, $thumbnail, false);
- $this->returnjson($arr);
- }
- }
|