Cannot add to ipsf

hi, I am using this code to try to add a simple file to ipfs… but i am method is just stuck on await call and gives an error “cannot fetch”
link to my code here.

Hi @nuel77

Could you please share with me a screenshot of the error you’re encountering?

I have run the same code and it seems that I’m receiving a hash for the file I’m uploading.

here is the error i am getting…

Error uploading file:  
TypeError: Failed to fetch
    at fetchCallImpl (

    at window.fetch (

    at fetchWith (

    at Client.fetch (

    at Client.fetch (

    at (

    at addAll (

    at async last (

    at async Object.add (

    at async onChange (