Problem description:
In HTML/CSS/JS Repls, any files created by a program in the shell in a subdirectory will not be hosted unless moved into the root directory and back
Expected behavior:
The files are automatically hosted without needing to be moved as described above.
Actual behavior:
You need to move the files to the root directory and back before they are hosted.
I suspect there’s something more to this issue, could you make a short screen recording of this issue or include some screenshots? This may help us get to the bottom of this.
Yeah, sorry for not doing enough testing, it seems that it’s only when a program in the shell creates files when it doesn’t host. I edited my original post.
Something very similar happened to me the other day. I uploaded a folder from my computer and all the files were served correctly. But then I renamed the folder (using Replit’s UI) and the files weren’t accessible using the new folder name in the URL. It just showed a 404 page. The old folder name seemed to work for a while after, but eventually stopped working (probably caching).
This issue is due to the way HTML Repls work under the hood. We use static storage to contain all of the updated files in order to serve them. Certain actions, such as editing the files or moving them between locations, will sync up with the static storage. However, actions such as renaming the files or uploading them may not be properly synced. We are aware of this issue, but we don’t have a solution at this time.
Instead, you can use the HTML Auto Refresh template that doesn’t rely on static hosting to serve your files. It uses our default dynamic hosting method which does not have the same issues as our static HTML Repls.