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

@@ -11,7 +11,7 @@ type ConvertOpts = {
directory?: string;
};
export const uploadFiles = async (files: File[], opts: ConvertOpts) => {
const { directory } = opts;
const { directory, appKey, version, username } = opts;
return new Promise((resolve, reject) => {
const formData = new FormData();
const webkitRelativePath = files[0]?.webkitRelativePath;
@@ -30,9 +30,13 @@ export const uploadFiles = async (files: File[], opts: ConvertOpts) => {
if (directory) {
formData.append('directory', directory);
}
console.log('formData', formData, files);
resolve(null);
return;
if (appKey && version) {
formData.append('appKey', appKey);
formData.append('version', version);
}
if (username) {
formData.append('username', username);
}
const token = localStorage.getItem('token');
if (!token) {
toastLogin();