From 0d09a3f7023b5bccffa7f8682a35b5515286d758 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Thu, 13 Jan 2022 08:37:56 -0800 Subject: [PATCH] fixing url. --- src/clj/auto_ap/background/sysco.clj | 2 +- src/clj/auto_ap/routes/invoices.clj | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/clj/auto_ap/background/sysco.clj b/src/clj/auto_ap/background/sysco.clj index 7f991e46..db69caf7 100644 --- a/src/clj/auto_ap/background/sysco.clj +++ b/src/clj/auto_ap/background/sysco.clj @@ -127,7 +127,7 @@ (mapcat (fn [k] (try (let [invoice-key (str "invoice-files/" (UUID/randomUUID) ".csv") - invoice-url (str "https://" (:data-bucket env) "/" invoice-key)] + invoice-url (str "https://" (:data-bucket env) ".s3-website-us-east-1.amazonaws.com/" invoice-key)] (s3/copy-object {:source-bucket-name (:data-bucket env) :destination-bucket-name (:data-bucket env) :source-key k diff --git a/src/clj/auto_ap/routes/invoices.clj b/src/clj/auto_ap/routes/invoices.clj index 0f7d727e..c957f5f3 100644 --- a/src/clj/auto_ap/routes/invoices.clj +++ b/src/clj/auto_ap/routes/invoices.clj @@ -416,7 +416,9 @@ :client-override client :location-override location :vendor-override vendor - :source-url (str "https://" (:data-bucket env) "/" s3-location))))] + :source-url (str "https://" (:data-bucket env) + ".s3-website-us-east-1.amazonaws.com/" + s3-location))))] (import-uploaded-invoice user imports)) {:status 200 :body (pr-str {})