【发布时间】:2020-03-02 21:14:14
【问题描述】:
我正在使用 axios 发布请求在 cloudinary 上上传图像,我也想使用 axios delete 删除图像,但我找不到任何 api url 或任何代码可以帮助我使用 axios delete 向 cloudnary 发送删除请求。
使用此代码将图片上传到 Cloudinarylet imageFile = this.props.img
var formData = new FormData()
formData.append('file', imageFile)
formData.append('upload_preset', Routes.CLOUDINARY_PRESET)
await axios.post(Routes.CLOUDINARY_API, formData)
.then(function (res) {
imageURL = res.data.secure_url
})
.catch(function (err) {
console.log("err", err)
})
【问题讨论】:
标签: javascript node.js reactjs axios cloudinary