0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-01 09:31:26 -05:00

Send mimetype on image upload.

This commit is contained in:
Andrey Antukh 2016-10-12 19:22:34 +02:00
parent 492e57d845
commit 7ad0b1f555
2 changed files with 4 additions and 1 deletions

View file

@ -203,6 +203,7 @@
(contains? allowed-file-types (.-type file)))
(prepare [[file [width height]]]
{:coll coll-id
:mimetype (.-type file)
:id (uuid/random)
:file file
:width width

View file

@ -45,8 +45,10 @@
(send! params)))
(defmethod request :create/image
[_ {:keys [coll id file width height] :as body}]
[_ {:keys [coll id file width height mimetype] :as body}]
(let [body (doto (js/FormData.)
(.append "mimetype" mimetype)
;; (.append "collection" (str coll))
(.append "file" file)
(.append "width" width)
(.append "height" height)