feat: add s3 storage provider integration

This commit is contained in:
2026-01-13 16:46:00 +08:00
parent bd8dab5764
commit e97be37b05
9 changed files with 253 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
import { request } from '../utils/request';
import { getTenantCode } from '../utils/tenant';
export const commonApi = {
getOptions: () => request('/common/options'),
@@ -88,7 +89,12 @@ export const commonApi = {
formData.append('type', type);
xhr = new XMLHttpRequest();
xhr.open('POST', '/v1/upload');
const tenantCode = getTenantCode();
if (!tenantCode) {
reject(new Error('Tenant code missing in URL'));
return;
}
xhr.open('POST', `/t/${tenantCode}/v1/upload`);
const token = localStorage.getItem('token');
if (token) {