upload.php 1.0 KB

12345678910111213141516171819202122232425262728
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2018-2020 rights reserved.
  6. // +----------------------------------------------------------------------
  7. // |
  8. // +----------------------------------------------------------------------
  9. // | Date: 2020-08-30 14:41
  10. // +----------------------------------------------------------------------
  11. use think\facade\Route;
  12. //@上传
  13. Route::group('upload', function () {
  14. //@图片文件
  15. Route::post('index','upload/index');
  16. //@上传视频
  17. Route::post('mp4','upload/mp4');
  18. //@文件上传
  19. Route::post('uploadFile','upload/uploadFile');
  20. //@上传证书
  21. Route::post('uploadCertFile','upload/uploadCertFile');
  22. })->middleware([
  23. \app\system\middleware\AllowOriginMiddleware::class,
  24. \app\system\middleware\AdminAuthTokenMiddleware::class
  25. // \app\adminapi\middleware\AdminCkeckRole::class
  26. ]);