mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
🐛 Fix upload team image
This commit is contained in:
parent
f8cb505196
commit
8a968dc081
3 changed files with 12 additions and 3 deletions
|
@ -426,8 +426,8 @@
|
|||
(rx/ignore)))))
|
||||
|
||||
(defn update-team-photo
|
||||
[{:keys [file] :as params}]
|
||||
(us/assert! ::di/file file)
|
||||
[file]
|
||||
(us/assert! ::di/blob file)
|
||||
(ptk/reify ::update-team-photo
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
|
|
|
@ -200,3 +200,12 @@
|
|||
:body (http/form-data params)})
|
||||
(rx/map http/conditional-decode-transit)
|
||||
(rx/mapcat handle-response)))
|
||||
|
||||
(defmethod command ::multipart-upload
|
||||
[id params]
|
||||
(->> (http/send! {:method :post
|
||||
:uri (u/join @cf/public-uri "api/rpc/command/" (name id))
|
||||
:credentials "include"
|
||||
:body (http/form-data params)})
|
||||
(rx/map http/conditional-decode-transit)
|
||||
(rx/mapcat handle-response)))
|
||||
|
|
|
@ -888,7 +888,7 @@
|
|||
|
||||
on-file-selected
|
||||
(fn [file]
|
||||
(st/emit! (dd/update-team-photo {:file file})))]
|
||||
(st/emit! (dd/update-team-photo file)))]
|
||||
|
||||
|
||||
(mf/use-effect
|
||||
|
|
Loading…
Reference in a new issue