Vimeo视频Ajax上传

时间:2019-01-02 21:10:49

标签: vimeo vimeo-api

我正在尝试通过ajax请求将视频上传到Vimeo帐户。我这样做的原因是必须同时上传多个视频。简而言之:我正在php后端上生成多个视频上传表单,从中获取操作URL,并在前端这样同时发出ajax请求

$.ajax({
       url: 'https://1512435583.cloud.vimeo.com/upload?ticket_id=...',
       method: 'post',
       data: formDataObject,
       contentType: false,
       processData: false
})

问题是Vimeo发布视频后上传是通过2重定向而不是我通过redirect_url设置的1重定向实现的。因此,我所有的ajax请求都重定向到https://vimeo.com/upload/api?video_file_id=...,但浏览器抛出以下错误
Access to XMLHttpRequest at 'https://1512435583.cloud.vimeo.com/upload?ticket_id=1...' from origin 'http://localhost.local' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. 有人可以建议同时上传多个视频到Vimeo吗?

0 个答案:

没有答案