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

@@ -2,13 +2,21 @@ import { sequelize } from '../../../modules/sequelize.ts';
import { DataTypes, Model } from 'sequelize';
type AppPermissionType = 'public' | 'private' | 'protected';
/**
* 共享设置
* 1. 设置公共可以直接访问
* 2. 设置受保护需要登录后访问
* 3. 设置私有只有自己可以访问。\n
* 受保护可以设置密码,设置访问的用户名。切换共享状态后,需要重新设置密码和用户名。
*/
export interface AppData {
files: { name: string; path: string }[];
permission?: {
// 访问权限
type: AppPermissionType; // public, private(Only Self), protected(protected, 通过配置访问)
users?: string[];
orgs?: string[];
// 访问权限, 字段和minio的权限配置一致
share: AppPermissionType; // public, private(Only Self), protected(protected, 通过配置访问)
usernames?: string; // 受保护的访问用户名,多个用逗号分隔
password?: string; // 受保护的访问密码
'expiration-time'?: string; // 受保护的访问过期时间
};
}
export type AppType = 'web-single' | 'web-module'; // 可以做到网页代理