Upload.php 478 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\admin\controller;
  3. use app\common\util\Result;
  4. class Upload extends BaseAuthorized
  5. {
  6. /**
  7. * 图片上传
  8. */
  9. public function img()
  10. {
  11. $res = $this->FileService()->uploadImage('adminImg');
  12. return Result::rest($res);
  13. }
  14. /**
  15. * 附件上传
  16. */
  17. public function attachment()
  18. {
  19. $res = $this->FileService()->uploadAttachment('adminContractAttachment');
  20. return Result::rest($res);
  21. }
  22. }