-
https://waline.js.org/reference/component.html#imageuploader 我搞后出现了错误 我是这样配置的,因为我的图床是允许游客上传以及兰空没输入token视为游客上传图片,但出现了错误 就是把token换成upload,但试了没有 我该怎么搞? |
Beta Was this translation helpful? Give feedback.
Answered by
w0oo
Jul 16, 2022
Replies: 2 comments
-
我是这样配置的
|
Beta Was this translation helpful? Give feedback.
0 replies
-
解决了, imageUploader : function(file) {
const formData = new FormData();
formData.append('file', file);
// formData.append('strategy_id', 0); // 可选策略ID
return fetch('https://域名/api/v1/upload', {
headers: {
'Authorization': 'Bearer id|token'
},
method: 'POST',
body: formData
}).then(resp => resp.json()).then(resp => resp.data.links.url);
}, 是那样的 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
w0oo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
解决了,
是那样的
杜老师那调的 https://dusays.com/456/?keyword=waline