在cloudinary [reactjs]上传多个epub / zip文件

loading...


0

当我尝试上传epub文件时,我得到了反响
{"error":{"message":"Unsupported ZIP file"}}
我在这做错了什么:

const formData=new FormData();
formData.append("resource_type", "auto");
formData.append("file", file);
formData.append("upload_preset", config.upload_preset);
formData.append("api_key", config.api_key);
formData.append("timestamp", (Date.now() /1000) |0);
 
await axios.post(cloudinaryUploadUrl, formData, {
headers: { "X-Requested-With":"XMLHttpRequest",},
}).then(response => {
constdata=response.data;
gUrl=gUrl.concat([data.secure_url]);
})

loading...

2回答
评论

暂时没有评论!