使用JavaScript或JQuery从cloudinary获取图像列表

使用JavaScript或JQuery从cloudinary获取图像列表,javascript,jquery,cloudinary,Javascript,Jquery,Cloudinary,我已经尝试了所有可能的代码,但代码给我以下错误 XMLHttpRequest cannot load https://api.cloudinary.com/cloud_name/resources/image. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8081' is therefore not allowed access. 代

我已经尝试了所有可能的代码,但代码给我以下错误

XMLHttpRequest cannot load https://api.cloudinary.com/cloud_name/resources/image. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8081' is therefore not allowed access.
代码(1)

代码(2)

对于这两种情况,它都无法进行身份验证

注意:我没有使用任何服务器端编程。请给我任何客户端解决方案/代码。

通过
$。获取(…)
我知道您正在客户端执行此调用(jQuery代码)。这意味着你向你的用户透露你的帐户的
api\u secret
,他们可以通过简单的页面“查看源”获取你的Cloudinary帐户的凭据,然后他们就可以完全控制你的帐户,包括上传、重命名甚至删除资源。由于您可能不希望发生这种情况,因此您应该仅在服务器端执行此操作,或者使用客户端(未签名)方法返回共享某个标记的所有资源。有关更多信息:

您得到的是CORS错误。如果必须在标题中发送任何额外参数,请尝试连接文档
$.get('https://app_key:app_secret@api.cloudinary.com/cloud_name/resources/image');
$.get('https://api.cloudinary.com/cloud_name/resources/image');