Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

201
Visualizações
Sveltekit fetch file from static folder

In sveltekit i have a static folder, in which i have .zip file, to get it locally i do something like:

const res = await fetch("/static/makeup.zip")

It works fine, but when i deployed my app i've got a 404 error

I've tried putting this file to different directories, tried different urls like: "/makeup.zip", "./static/makeup.zip", "makeup.zip"

(i think someone who knows gatsby/nuxt can help)

Where should i put this file or how the query should look like ? Thanks

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

The solution was: create folder named public and put this file into it, the request looks like this : await fetch("/makeup.zip")

about 4 years ago · Juan Pablo Isaza Relatório

0

What is the deployment URL?

This would grab the file from the root of the site. If your static folder is in dist,

App   
-_app   
--static

It would grab

App
-static

Also, what adapters are you using?

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda