尽管共享存储的图像效果很好(与邮递员尝试过)。我无法使其与图像(SS3)的url
一起使用。
我尝试发送URL as an URL, blob, buffer, base64
,但每次收到此消息时都返回400: Unable to parse form content
如何尝试以Blob形式分享的示例。
const mediaUrl = https://d29fp8qybdwwik.cloudfront.net/bBKZjMgj6TZZwSJot/uE7Fjrk6BA-brooke-lark-500193-unsplash.jpg
const config = {
headers: {
Authorization: `Bearer ${accessToken}`
}
};
const blob = await axios
.get(mediaUrl, {
responseType: 'blob'
})
.then(response =>
response.data
);
const url = 'https://api.linkedin.com/media/upload';
const data = new FormData();
data.append('fileupload', blob);
const response = await axios.post(url, data, config);
任何帮助将不胜感激。
PS: Linkedin的v2 API是一场噩梦