From 3cd36d1301d02540c687a00a157366426d6f2d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=9F=E5=B7=9D=E4=B8=9C?= Date: Wed, 16 Apr 2025 09:23:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=8E=B7=E5=8F=96=20OSS=20=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=96=87=E4=BB=B6=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/worker/controller/Common.php | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 application/worker/controller/Common.php diff --git a/application/worker/controller/Common.php b/application/worker/controller/Common.php new file mode 100644 index 0000000..fc73c41 --- /dev/null +++ b/application/worker/controller/Common.php @@ -0,0 +1,25 @@ +request->post('name'); + if (empty($name)) { + $this->error('文件名必填'); + } + + $md5 = md5($name); + $auth = new \addons\alioss\library\Auth(); + $params = $auth->params($name, $md5); + $params['OSSAccessKeyId'] = $params['id']; + $params['success_action_status'] = 200; + $params['cdnurl'] = cdnurl('', true); + + $this->success('', null, $params); + } +} \ No newline at end of file