ring

JAtkins 2017-06-05T23:39:11.164393Z

Hi all! I have a question about partial file serving with ring. I have a handler that takes a file id, finds that file location, and then serves it. I want to make this endpoint compatible with partial file loading, but I can't find any information about it on the web, aside from (https://github.com/remvee/ring-partial-content). (It seems to work only with wrap-file, and I don't think that fits my usecase, but I may be wrong). Does anyone have experiance with this problem?

2017-06-05T23:45:19.225071Z

@jatkin ring-partial-content looks like it works with strings, input streams, and files. It uses a multimethod, so it can be extended to any other type you want.

JAtkins 2017-06-05T23:59:34.363009Z

Ok, now I'm a bit confused. I had this code:

(def http-handler
  (-> routes
      (wrap-defaults api-defaults)
      pc/wrap-partial-content
      wrap-gzip))
But that didn't work, as far as I could tell.