I saw that someone asked a while back on stackoverflow (rust - Is there a way to pass a custom file path to warp::fs::file? - Stack Overflow) whether something like this is possible in warp:
warp::path!("files" / u32)
.map(|fileId| {
format!("{}.txt", *FILES_PATH, fileId)
})
.and(warp::fs::file)
The documentation only gives an example of how to provide static files (in directories) for download (https://github.com/seanmonstar/warp/blob/master/examples/file.rs). I was wondering whether the exampl I provided (or something similar) is now possible.
Thanks!