This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-01
Channels
- # beginners (2)
- # cider (20)
- # cljsjs (3)
- # clojure (86)
- # clojure-italy (2)
- # clojure-spec (7)
- # clojure-uk (3)
- # clojurescript (8)
- # defnpodcast (3)
- # emacs (10)
- # figwheel (1)
- # hoplon (9)
- # immutant (4)
- # keechma (2)
- # luminus (11)
- # off-topic (13)
- # re-frame (6)
- # reagent (3)
- # ring (1)
- # specter (5)
- # sql (2)
- # unrepl (127)
you might want to take a look at this middleware https://github.com/joodie/ring-upload-progress/blob/master/src/ring/middleware/upload_progress.clj
I was looking at various issues and couldn't find where prone
is enabled in the template by default. @yogthos do you know what file has those settings?
yeah it hides here https://github.com/luminus-framework/luminus-template/blob/master/resources/leiningen/new/luminus/core/env/dev/clj/dev_middleware.clj
@romain I updated the upload middleware to work with the latest Ring, let me know if it works for you https://github.com/luminus-framework/ring-upload-progress
actually it looks like there's already an implementation in Ring core as well https://github.com/ring-clojure/ring/blob/eaf3af0449ad96b3f036a1ea9391af797e3654d9/ring-core/src/ring/middleware/multipart_params.clj#L19
looks like all you have to do is:
(wrap-defaults
(-> site-defaults
(assoc-in [:security :anti-forgery] false)
(assoc-in [:params :multipart]
{:progress-fn
(fn [request bytes-read content-length item-count]
(println "bytes read:" bytes-read
"\ncontent length:" content-length
"\nitem count:" item-count))})))
added a full example https://github.com/luminus-framework/examples/tree/master/file-upload-progress