mirror of
https://github.com/penpot/penpot.git
synced 2025-07-15 03:07:16 +02:00
⬆️ Update backend dependencies
This commit is contained in:
parent
b31a6f33a5
commit
f949649ba3
14 changed files with 50 additions and 79 deletions
|
@ -18,9 +18,13 @@
|
|||
[datoteka.io :as io]
|
||||
[integrant.core :as ig])
|
||||
(:import
|
||||
java.io.InputStream
|
||||
java.io.OutputStream
|
||||
java.nio.file.Files
|
||||
java.nio.file.Path))
|
||||
|
||||
(set! *warn-on-reflection* true)
|
||||
|
||||
;; --- BACKEND INIT
|
||||
|
||||
(s/def ::directory ::us/string)
|
||||
|
@ -58,9 +62,9 @@
|
|||
(when-not (fs/exists? (fs/parent full))
|
||||
(fs/create-dir (fs/parent full)))
|
||||
|
||||
(dm/with-open [src (io/input-stream content)
|
||||
dst (io/output-stream full)]
|
||||
(io/copy! src dst))
|
||||
(with-open [^InputStream src (io/input-stream content)]
|
||||
(with-open [^OutputStream dst (io/output-stream full)]
|
||||
(io/copy src dst)))
|
||||
|
||||
object))
|
||||
|
||||
|
@ -78,8 +82,8 @@
|
|||
|
||||
(defmethod impl/get-object-bytes :fs
|
||||
[backend object]
|
||||
(dm/with-open [input (impl/get-object-data backend object)]
|
||||
(io/read-as-bytes input)))
|
||||
(with-open [^InputStream input (impl/get-object-data backend object)]
|
||||
(io/read input)))
|
||||
|
||||
(defmethod impl/get-object-url :fs
|
||||
[{:keys [::uri] :as backend} {:keys [id] :as object} _]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue