mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 17:18:21 -05:00
✨ Make the region param optional on s3 storage backend
Defaulting to the eu-central-1
This commit is contained in:
parent
69cb626cab
commit
20f357d75d
1 changed files with 4 additions and 3 deletions
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
;; --- BACKEND INIT
|
;; --- BACKEND INIT
|
||||||
|
|
||||||
(s/def ::region #{:eu-central-1})
|
(s/def ::region ::us/keyword)
|
||||||
(s/def ::bucket ::us/string)
|
(s/def ::bucket ::us/string)
|
||||||
(s/def ::prefix ::us/string)
|
(s/def ::prefix ::us/string)
|
||||||
(s/def ::endpoint ::us/string)
|
(s/def ::endpoint ::us/string)
|
||||||
|
@ -68,9 +68,10 @@
|
||||||
(s/keys :opt-un [::region ::bucket ::prefix ::endpoint ::wrk/executor]))
|
(s/keys :opt-un [::region ::bucket ::prefix ::endpoint ::wrk/executor]))
|
||||||
|
|
||||||
(defmethod ig/prep-key ::backend
|
(defmethod ig/prep-key ::backend
|
||||||
[_ {:keys [prefix] :as cfg}]
|
[_ {:keys [prefix region] :as cfg}]
|
||||||
(cond-> (d/without-nils cfg)
|
(cond-> (d/without-nils cfg)
|
||||||
prefix (assoc :prefix prefix)))
|
(some? prefix) (assoc :prefix prefix)
|
||||||
|
(nil? region) (assoc :region :eu-central-1)))
|
||||||
|
|
||||||
(defmethod ig/init-key ::backend
|
(defmethod ig/init-key ::backend
|
||||||
[_ cfg]
|
[_ cfg]
|
||||||
|
|
Loading…
Add table
Reference in a new issue