0

When use <link rel="stylesheet" type="text/css" href="https://drive.google.com/uc?export=view&id=[stylesheet - ID]"> //True

and use <img class="item-left-b" src="https://drive.google.com/uc?export=view&id=[image - ID]"> //True

but this

var $Items = new Backbone.Collection;
$Items.url = 'https://drive.google.com/uc?export=view&id=[Items JSON file - ID]';
$Items.fetch();

//Error

How i can get JSON file like css file or image using Backbone.Collection?

Im live in syria, in a U.S.-sanctioned, i cannot use one of them Bitbucket, SourceForge, GitLab, Github and CloudForge Repository Hosts.

  • Does this answer your question? [Why does my JavaScript code receive a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error, while Postman does not?](https://stackoverflow.com/questions/20035101/why-does-my-javascript-code-receive-a-no-access-control-allow-origin-header-i) – jabaa Feb 16 '22 at 16:40
  • This is probably a better duplicate: [Google Drive CORS](https://stackoverflow.com/questions/24026016/google-drive-cors) – jabaa Feb 16 '22 at 16:42
  • I want to get JSON file like css file, – Majd Al-Atrash Feb 16 '22 at 17:00
  • Have you read the links about CORS? You need a browser extension or a proxy server. – jabaa Feb 16 '22 at 17:08
  • It's possible that the server sets CORS headers when you use an access token. – jabaa Feb 16 '22 at 17:12
  • If you mean about when fetch JSON, i tried vpn. Repository Hosts Sites they ask for confirmation message,They disable the entire account if you open it once without VPN. – Majd Al-Atrash Feb 16 '22 at 17:24
  • I'm not running a server, I just want to use Google-drive as database – Majd Al-Atrash Feb 16 '22 at 17:29
  • Have you read the linked questions? – jabaa Feb 16 '22 at 17:55

0 Answers0