• @[email protected]OP
    link
    fedilink
    81 month ago

    read svg file with path given in config

    Know Jack shit about go and since all you need to do is read a file and put it in I thought I’d let ai handle it

    İt took me far too long and I was just done with it by then and the ai for some reason is acting fucking playful it’s even mocking me I can’t handle it

    • @Solemarc
      link
      131 month ago

      My comment was supposed to be a bit of a joke…

      Generally speaking, you cannot read a file from disk using JS in the browser because the sandbox doesn’t allow the code access to your disk. If you googled something like “read a file JS” it probably made an assumption that you’re using Server side like nodejs or deno. The only exception for in-browser that I know of is to upload files using an input tag.

      • Pup Biru
        link
        fedilink
        English
        81 month ago

        that looks like a go template, so i’d wager it’s something server-side

        • @Solemarc
          link
          11 month ago

          Maybe, I’ve never used go templates before.