We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Topics to cover:
The text was updated successfully, but these errors were encountered:
The basic gist is.
Ensure you have a form which is like POST, enctype, input type=file ...
[:form {:method "POST" :action "/add" :enctype "multipart/form-data"} "File" [:input {:type "file" :name "file" :placeholder "local mp3 file"}] [:input {:type "submit" :value "Add File"}]]
Ensure your route has the multipart interceptor aka
(def routes #{ ["/add" :post (conj [(io.pedestal.http.ring-middlewares/multipart-params) `add-page])] })
pull the data from the request...
(defn add-page [request] (let [file (get (:params request) "file") filename (:filename file) tempfile (:tempfile file)] (io/copy tempfile (io/file "/tmp/destfile"))))
Sorry, something went wrong.
Prefer a Cookbook recipe.
:expires-in
No branches or pull requests
Topics to cover:
The text was updated successfully, but these errors were encountered: