feat: 上传资源和下载资源更新

This commit is contained in:
2025-03-20 02:29:26 +08:00
parent 9b1045d456
commit 0179fe73a3
19 changed files with 747 additions and 225 deletions

View File

@@ -0,0 +1,15 @@
import { router } from '@/app.ts';
import { authMinio } from '../minio/get-minio-resource.ts';
router.all('/api/s1/share/*splat', async (req, res) => {
try {
const url = req.url;
const _url = new URL(url || '', 'http://localhost');
const objectName = _url.pathname.replace('/api/s1/share/', '');
await authMinio(req, res, objectName);
} catch (e) {
console.log('get share resource error url', req.url);
console.error('get share resource is error.', e.message);
res.end('get share resource is error.');
}
});