Javascript 从url下载Google驱动器文件,并通过post发送到后端
我试图从javascript中的url(chrome驱动器文件)下载一个文件;并希望将其发送到我的后端(php-laravel) 把手上Javascript 从url下载Google驱动器文件,并通过post发送到后端,javascript,php,google-api,google-drive-api,Javascript,Php,Google Api,Google Drive Api,我试图从javascript中的url(chrome驱动器文件)下载一个文件;并希望将其发送到我的后端(php-laravel) 把手上 handle_download: function (content, file, status) { if (status !== 200) { console.log('error occured on status') return; } } 加载失败:对飞行前请求的响应未
handle_download: function (content, file, status) {
if (status !== 200) {
console.log('error occured on status')
return;
}
}
加载失败:对飞行前请求的响应未通过访问控制检查:请求的资源上不存在“访问控制允许来源”标头。因此,不允许访问源“”
这是由于web中的错误而导致的预期行为。既然您这样做是为了测试,那么就试试这个chrome扩展 您可以在中阅读有关如何实现此功能的更多信息。 这也可能提供额外的见解
handle_download: function (content, file, status) {
if (status !== 200) {
console.log('error occured on status')
return;
}
}