Fork me on GitHub
#beginners
<
2017-02-21
>
joakimmohn07:02:12

I'm having trouble supporting jpg fileformat for file upload with ring. Is this not enabled by default? and how do I enable it?

sudodoki07:02:33

Are you using AJAX form or just post’ing form with input type file? Have you seen note in Ring’s wiki https://github.com/ring-clojure/ring/wiki/File-Uploads ?

joakimmohn07:02:25

im using the google closure iframio.

sudodoki07:02:48

can you either dump your request on the server and see what are the headers / body or log as cURL from browser's devtools? Maybe, taking a look at those would help you figure out, what the request is and whether you are able to handle it correctly

mruzekw18:02:37

Does anyone know why I receive this error when clearly the function is in the other namespace?

java.lang.RuntimeException: No such var: ui/app

mruzekw18:02:45

ui.cljc

(rum/defc app [user]
  …)
home.clj
(defn home-page [request]
  (layout/render
   "layout.html"
   {:app (rum/render-html (ui/app (:identity request)))}))

mruzekw18:02:32

It’s as if ui.cljc wasn’t even loading...

mruzekw18:02:58

But it is since I can access other vars in the namespace

mruzekw18:02:57

And now it’s randomly working -_-

lepistane18:02:20

Ye sometimes you need to evaluate new functions in that namespace happened to me few days ago while debuging webapp xD