0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-28 15:41:25 -05:00

Add file structure validation on binfile import

This commit is contained in:
Andrey Antukh 2023-11-11 00:07:58 +01:00
parent 19c5d32a89
commit 31c46a90b4

View file

@ -12,6 +12,7 @@
[app.common.features :as cfeat]
[app.common.files.defaults :as cfd]
[app.common.files.migrations :as pmg]
[app.common.files.validate :as fval]
[app.common.fressian :as fres]
[app.common.logging :as l]
[app.common.spec :as us]
@ -743,7 +744,13 @@
(update :pages-index relink-shapes)
(update :components relink-shapes)
(update :media relink-media)
(pmg/migrate-data))))
(pmg/migrate-data)
(d/without-nils))))
;; Without providing all libs, here we just
;; peform a structural file data validation,
;; full referential check is omited.
(fval/validate-file!)
(postprocess-file)
(update :features #(db/create-array conn "text" %))
(update :data blob/encode))]