mirror of
https://github.com/penpot/penpot.git
synced 2025-06-02 06:11:38 +02:00
✨ Exporting big files flow
This commit is contained in:
parent
0d4de50f13
commit
3ae7c42afa
9 changed files with 118 additions and 87 deletions
|
@ -126,24 +126,14 @@
|
|||
[_ params]
|
||||
(send-export-command :cmd :export-shapes :params params :blob? false))
|
||||
|
||||
(defmethod query :export-frames
|
||||
[_ params]
|
||||
(send-export-command :cmd :export-frames :params (assoc params :uri (str base-uri)) :blob? false))
|
||||
|
||||
(defmethod query :download-export-resource
|
||||
[_ id]
|
||||
(send-export-command :cmd :get-resource :params {:id id} :blob? true))
|
||||
|
||||
(defmethod query :export-frames
|
||||
[_ exports]
|
||||
(let [params {:uri (str base-uri)
|
||||
:cmd :export-frames
|
||||
:wait false
|
||||
:exports exports}]
|
||||
(->> (http/send! {:method :post
|
||||
:uri (u/join base-uri "api/export")
|
||||
:body (http/transit-data params)
|
||||
:credentials "include"
|
||||
:response-type :blob})
|
||||
(rx/mapcat handle-response)
|
||||
(rx/ignore))))
|
||||
|
||||
(derive :upload-file-media-object ::multipart-upload)
|
||||
(derive :update-profile-photo ::multipart-upload)
|
||||
(derive :update-team-photo ::multipart-upload)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue