CodingTrain / Intro-to-Data-APIs-JS

Working with Data and APIs in JavaScript
MIT License
756 stars 611 forks source link

Fetch API cannot load file #47

Closed yashshah14093 closed 4 years ago

yashshah14093 commented 4 years ago

Please Help me out of this error...

Fetch API cannot load file:

///C:/Users/91894/OneDrive/Desktop/Data%20and%20API/Client-Side%20Basics/1/1.1%20Image(one)/Seita.jpg.

URL scheme must be "Http" or "https" for CORS request.

anuraghazra commented 4 years ago

@yashshah14093 try installing "live server" vscode plugin and "open with live server" and also make sure not to reference that Seita.jpg file from outside the folder you are currently on.

your folder structure should look like this

https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer

yashshah14093 commented 4 years ago

@anuraghazra Could you have any option other than installing live-server? I like to use sublime text as a text editor.

gruselhaus commented 4 years ago

@anuraghazra Could you have any option other than installing live-server? I like to use sublime text as a text editor.

https://packagecontrol.io/packages/LiveReload

yashshah14093 commented 4 years ago

Thanks, It works.