ring

sova-soars-the-sora 2018-06-25T16:55:35.000267Z

Hi, i'm wondering about uploading files via html form and /post...

sova-soars-the-sora 2018-06-25T16:56:20.000093Z

I'm not really sure how it's supposed to work. does an upload action put a file at a :tempfile "/path/" that I can then reference with java.io.copy to store locally?

jumar 2018-06-28T07:46:03.000314Z

We use sth. like this:

(mp/wrap-multipart-params
         (POST "/teams/import" {{{tempfile :tempfile filename :filename} :importteamsfile} :params :as params}
           (friend/authorize #{roles/project-configuration} (import-developer-teams project-id tempfile filename))))
mp is ring.middleware.multipart-params

sova-soars-the-sora 2018-06-25T16:56:34.000415Z

i keep getting null pointer exceptions it's difficult to debug.

sova-soars-the-sora 2018-06-25T17:01:03.000635Z

is there a reason {:enctype "multipart/formdata"} doesn't want to play nicely?