mirror of
https://github.com/penpot/penpot.git
synced 2025-07-17 16:37:58 +02:00
✨ Normalize file retrieving and persistence on binfile, file-gc and helpers
This commit is contained in:
parent
74bdd72d2f
commit
541ed6282f
14 changed files with 222 additions and 278 deletions
|
@ -119,6 +119,7 @@
|
|||
(sv/defmethod ::update-file
|
||||
{::climit/id [[:update-file/by-profile ::rpc/profile-id]
|
||||
[:update-file/global]]
|
||||
|
||||
::webhooks/event? true
|
||||
::webhooks/batch-timeout (dt/duration "2m")
|
||||
::webhooks/batch-key (webhooks/key-fn ::rpc/profile-id :id)
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
;; Process and persist file
|
||||
(let [file (->> (bfc/process-file file)
|
||||
(bfc/persist-file! cfg))]
|
||||
(bfc/save-file! cfg))]
|
||||
|
||||
;; The file profile creation is optional, so when no profile is
|
||||
;; present (when this function is called from profile less
|
||||
|
@ -86,7 +86,7 @@
|
|||
fmeds)]
|
||||
(db/insert! conn :file-media-object params ::db/return-keys false))
|
||||
|
||||
file)))
|
||||
(bfc/decode-file cfg file))))
|
||||
|
||||
(def ^:private
|
||||
schema:duplicate-file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue