mirror of
https://github.com/penpot/penpot.git
synced 2026-07-26 07:58:13 +00:00
Send mimetype on image upload.
This commit is contained in:
parent
492e57d845
commit
7ad0b1f555
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user