twikoo-func 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/image.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twikoo-func",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "A simple comment system.",
5
5
  "author": "imaegoo <hello@imaegoo.com> (https://github.com/imaegoo)",
6
6
  "license": "MIT",
package/utils/image.js CHANGED
@@ -46,6 +46,9 @@ const fn = {
46
46
  // 自定义兰空图床(v2)URL
47
47
  const formData = new FormData()
48
48
  formData.append('file', fn.base64UrlToReadStream(photo, fileName))
49
+ if (process.env.TWIKOO_LSKY_STRATEGY_ID) {
50
+ formData.append('strategy_id', parseInt(process.env.TWIKOO_LSKY_STRATEGY_ID))
51
+ }
49
52
  const url = `${imageCdn}/api/v1/upload`
50
53
  let token = config.IMAGE_CDN_TOKEN
51
54
  if (!token.startsWith('Bearer')) {