File upload bug

sveltejs/kit#4832

This repo is to demonstrate a bug that occurs when dynamically adding files to the static folder when using @sveltejs/adapter-node.

Reproduction

Clone this repo and build it.

npm run build

Next, navigate to the build directory and run the index.js

cd build && node index.js

Notice how after uploading files and clicking the links, a 404 is received, even though the file is within the static folder.

choose submitted file 404

Notes

This seems to only be an issue when running in production. Running in development works just fine

npm run dev # or preview <-- Works just fine