swifter
swifter copied to clipboard
how can shareFilesFromDirectory support files in subdirectory?
let docsPath = Bundle.main.resourcePath! + "/dist.bundle"
server["/:path"] = shareFilesFromDirectory(docsPath, defaults: ["index.html"])
try! server.start(13001)
test: curl http://127.0.0.1:13001/index.html working curl http://127.0.0.1:13001/ not working, but is this suppose to load the index.html in the directory? curl http://127.0.0.1:13001/_next/static/chunks/framework-xx.js all not woking?
How can I make files in subdirectorys work?
Did you find a way to solve this?
Hi @damian-kolakowski - I am trying to find a solution for this.
While this works in the simulator on a device running iOS 15.4
this is not working; only the index.html
page is loaded but not the rest of the contents in the directory.
Do you have any thoughts on this, please?
Got the same problem here, if the path contains any subdirectories, the registered handler "shareFilesFromDirectory" won't be invoked at all.