feat: 修复Container界面和File App 和 User App

User App 添加permission
This commit is contained in:
2025-03-19 17:37:12 +08:00
parent 837457a5f7
commit 27d9bdf54e
36 changed files with 927 additions and 1349 deletions

View File

@@ -12,7 +12,7 @@ type ConvertOpts = {
};
export const uploadFileChunked = async (file: File, opts: ConvertOpts) => {
const { directory } = opts;
const { directory, appKey, version, username } = opts;
return new Promise(async (resolve, reject) => {
const token = localStorage.getItem('token');
if (!token) {
@@ -66,6 +66,13 @@ export const uploadFileChunked = async (file: File, opts: ConvertOpts) => {
if (directory) {
formData.append('directory', directory);
}
if (appKey && version) {
formData.append('appKey', appKey);
formData.append('version', version);
}
if (username) {
formData.append('username', username);
}
try {
const res = await fetch('/api/s1/resources/upload/chunk?taskId=' + taskId, {
method: 'POST',