feat(upload): add storage mode selection and retrieval for image uploads

This commit is contained in:
shiyu
2025-06-13 12:32:43 +08:00
parent d4bf9493c1
commit 28ca2387f7
5 changed files with 84 additions and 4 deletions

View File

@@ -139,6 +139,14 @@ export const getStorageTypes = async (): Promise<BaseResult<StorageTypeResponse[
);
};
// 获取可用的存储模式 (通常是启用的模式,用于选择)
export const getAvailableStorageModes = async (): Promise<BaseResult<StorageModeResponse[]>> => {
return fetchApi<StorageModeResponse[]>(
'/management/storage/get_available_modes',
{ method: 'GET' }
);
};
// 获取默认存储模式ID
export const getDefaultStorageModeId = async (): Promise<BaseResult<number | null>> => {
return fetchApi<number | null>(