Skip to content

Commit

Permalink
feat: support specify MEDIA_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerblue committed Nov 19, 2023
1 parent cbfea97 commit 807628c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/configs/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ const constants = {
siteName: 'SDUT OJ',
siteTitle: 'SDUT OnlineJudge',
accessTokenCookieName: 'access_token_openoj',
// avatarUrlPrefix: 'http://127.0.0.1/tmp4oj/avatars/',
// bannerImageUrlPrefix: 'http://127.0.0.1/tmp4oj/banner_images/',
imageDirPrefix: '/image/',
avatarUrlPrefix: '/image/avatars/',
bannerImageUrlPrefix: '/image/banner_images/',
imageDirPrefix: `${process.env.MEDIA_URL}/image/`,
avatarUrlPrefix: `${process.env.MEDIA_URL}/image/avatars/`,
bannerImageUrlPrefix: `${process.env.MEDIA_URL}/image/banner_images/`,
requestTimeout: 60 * 1000,
msgDuration: {
success: 3,
Expand Down
2 changes: 2 additions & 0 deletions tasks/upload-cdn.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable func-name-matching */
/* eslint-disable @typescript-eslint/no-require-imports */
// 上传产物到腾讯云 COS

const fs = require('fs');
Expand Down

0 comments on commit 807628c

Please sign in to comment.