diff --git a/client/src/components/admin/ImagePicker.vue b/client/src/components/admin/ImagePicker.vue index 8317637..551361b 100644 --- a/client/src/components/admin/ImagePicker.vue +++ b/client/src/components/admin/ImagePicker.vue @@ -165,7 +165,7 @@ const uploadFile = async (file: File) => { if (props.categoryId) { formData.append('categoryId', props.categoryId.toString()) } - formData.append('storageType', 'local') + formData.append('storageType', 'aliyun') const result = await parseApiResponse<{ fileUrl: string }>(await authFetch(`${API_BASE}/admin/attachments/upload`, { method: 'POST', diff --git a/client/src/components/admin/ImageUpload.vue b/client/src/components/admin/ImageUpload.vue index f203f54..42a67cf 100644 --- a/client/src/components/admin/ImageUpload.vue +++ b/client/src/components/admin/ImageUpload.vue @@ -366,7 +366,7 @@ const uploadSingleFile = async (file: File): Promise => { if (props.categoryId) { formData.append('categoryId', props.categoryId.toString()) } - formData.append('storageType', 'local') + formData.append('storageType', 'aliyun') const result = await parseApiResponse<{ fileUrl: string }>(await authFetch(`${API_BASE}/admin/attachments/upload`, { method: 'POST', diff --git a/client/src/components/admin/VideoUpload.vue b/client/src/components/admin/VideoUpload.vue index b10edb1..f8ce5de 100644 --- a/client/src/components/admin/VideoUpload.vue +++ b/client/src/components/admin/VideoUpload.vue @@ -46,7 +46,7 @@ const uploadFile = async (file: File) => { const formData = new FormData() formData.append('file', file) if (props.categoryId) formData.append('categoryId', props.categoryId.toString()) - formData.append('storageType', 'local') + formData.append('storageType', 'aliyun') const result = await parseApiResponse<{ fileUrl: string }>( await authFetch(`${API_BASE}/admin/attachments/upload`, { method: 'POST', headers: {}, body: formData }) ) diff --git a/client/src/composables/useMdMediaUpload.ts b/client/src/composables/useMdMediaUpload.ts index 6fbc7cd..a5af6cf 100644 --- a/client/src/composables/useMdMediaUpload.ts +++ b/client/src/composables/useMdMediaUpload.ts @@ -14,7 +14,7 @@ export function useMdMediaUpload(editorRef: Ref) { const formData = new FormData() formData.append('file', file) formData.append('categoryId', '1') - formData.append('storageType', 'local') + formData.append('storageType', 'aliyun') const response = await authFetch('/api/admin/attachments/upload', { method: 'POST', diff --git a/client/src/pages/admin/Attachments.vue b/client/src/pages/admin/Attachments.vue index 3bf61dd..07f2eba 100644 --- a/client/src/pages/admin/Attachments.vue +++ b/client/src/pages/admin/Attachments.vue @@ -293,7 +293,7 @@ const uploadFileWithFile = async (file: File) => { if (uploadCategoryId.value > 0) { formData.append('categoryId', uploadCategoryId.value.toString()) } - formData.append('storageType', 'local') + formData.append('storageType', 'aliyun') await parseApiResponse(await authFetch(`${API_BASE}/admin/attachments/upload`, { method: 'POST', diff --git a/client/src/pages/admin/OSSConfigs.vue b/client/src/pages/admin/OSSConfigs.vue index d271e32..1339d9d 100644 --- a/client/src/pages/admin/OSSConfigs.vue +++ b/client/src/pages/admin/OSSConfigs.vue @@ -59,9 +59,9 @@ type="text" id="ossAccessKeyId" v-model="ossForm.ossAccessKeyId" - required + :required="!currentConfig" class="admin-input font-mono" - placeholder="OSS Access Key ID" + placeholder="留空则保持原密钥;新建时必填" > @@ -73,9 +73,9 @@ type="password" id="ossAccessKeySecret" v-model="ossForm.ossAccessKeySecret" - required + :required="!currentConfig" class="admin-input font-mono" - placeholder="OSS Access Key Secret" + placeholder="留空则保持原密钥;新建时必填" > @@ -285,6 +285,15 @@
+ @@ -297,7 +306,7 @@