CodingTrain/Intro-to-Data-APIs-JS

Fetch API cannot load file

yashshah14093 opened this issue · 4 comments

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.

@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

  • my-project
    • index.html
    • Seita.jpg

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

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

@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

Thanks, It works.