我被困在将文件上传到cloudinary . 服务器抛出错误:无法加载https://api.cloudinary.com/v1_1/example-com/image/upload:请求标头字段预检响应中的Access-Control-Allow-Headers不允许授权 .

handleDrop = files => {
// Push all the axios request promise into a single array
// const uploaders = files.map(file => {
// Initial FormData
const formData = new FormData();
// formData.append("file", file);

formData.append("upload_preset", "232323"); // Replace the preset name with your own
formData.append("api_key", "sadsd"); // Replace API key with your own Cloudinary key
formData.append("timestamp", (Date.now() / 1000) | 0);

// Make an AJAX upload request using Axios (replace Cloudinary URL below with your own)
return axios
  .post(
    "https://api.cloudinary.com/v1_1/example-com/image/upload",
    formData,
    {
      headers: { "X-Requested-With": "XMLHttpRequest" }
    }
  )
  .then(response => {
    const data = response.data;
    const fileURL = data.secure_url; // You should store this URL for future references in your app
    console.log(data);
  });
// });

// Once all the files are uploaded
// axios.all(uploaders).then(() => {
//   // ... perform after upload is successful operation
// });

};

您认为这个问题是什么?