feat: fetch and alt mime types for markdown #45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/raw"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR got out of hand.
jot fetchCloses #19
This entire thing depends on local file paths when it's very likely this would be used to fetch when local files do not exist. This either requires prior knowledge, or fudging your way through paths given by
jot objects. Walking the directory is also useless in this case.It would also not be useful in the case of multiple clients using the same key. For instance, Alice updates
x.textand Bob fetches it. Bob would have to have prior knowledge of the file.Consider refactoring this entire thing to work off a list objects response from the server instead of local file paths. Though it would still need to work on local filesytem paths...
Use cases:
test.txt. Alice runsjot fetch test.txtjot fetch /home/bob/jotjot fetch .This PR would work for 1, and not for 2 and 3.
@ -200,28 +200,104 @@ async fn key_path(req: &mut Request, res: &mut Response) {let short_id = req.param::<String>("short_id").unwrap();let subpath = req.param::<String>("subpath").unwrap();// TODO: break this whole block upthis worth doing now?
@ -0,0 +1,81 @@pub trait PathJoin {document this
@treadful wrote in #45 (comment):
Also,
jot objectsshould list full local paths as well.fetchcommand is now based on remote objects, not local filesfeat: implements text/plain and application/octet-stream fetching for markdown filesto feat: fetch and alt mime types for markdownjot objectsreturn local filesystem paths? #46