Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!