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:
parent
492e57d845
commit
7ad0b1f555
2 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue