this post was submitted on 15 Jan 2025
57 points (77.1% liked)

Programming

17814 readers
516 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Solemarc@lemmy.world 12 points 1 day ago (1 children)

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.

[–] pupbiru@aussie.zone 8 points 1 day ago (1 children)

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

[–] Solemarc@lemmy.world 1 points 1 day ago

Maybe, I've never used go templates before.