Skip to content

Commit

Permalink
fix: 修复问题
Browse files Browse the repository at this point in the history
  • Loading branch information
JackySoft committed Oct 24, 2024
1 parent ad69f3a commit c4e2c22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/koa/router/img.cloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ router.post('/upload/files', async (ctx) => {
}
});

const url = `${config.OSS_CDNDOMAIN1}/${key}`;
const url = `${config.OSS_CDNDOMAIN2}/${key}`;
await imgcloud.create(userId, userName, file.originalFilename, key, file.mimetype, file.size, url);
util.success(ctx);
} catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion packages/editor/src/pages/home/cloud/ImgCloud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ export default function ImgCloud() {

const props: UploadProps = useMemo(() => {
const token = storage.get('token');
const baseApi = import.meta.env.VITE_BASE_API;
return {
name: 'file',
action: 'http://mars-api.marsview.cc/api/cloud/upload/files',
action: `${baseApi}/cloud/upload/files`,
headers: {
Authorization: `Bearer ${token}`,
},
Expand Down

0 comments on commit c4e2c22

Please sign in to comment.