Skip to content

Commit

Permalink
Fix access to get private file URLs (#1565)
Browse files Browse the repository at this point in the history
[Re #1543]

We were not including the namespace that extends the GCSStorageClient
protocol with the methods to get blob signed URL and delete blob-relate
functionality, that was preventing the reading of private image files
from GCS. This was not reproduced locally, since there we load always
all the namespaces, which is not the case with the Uberjar. So now we
require the mentioned file as part of the File service, that is
required already, fixing the issue.
  • Loading branch information
joseAyudarte91 authored Aug 24, 2023
1 parent eb996d5 commit cb939f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/gpml/service/file.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns gpml.service.file
(:require [clj-gcp.storage.core :as storage-client]
[duct.logger :refer [log]]
[gpml.boundary.adapter.storage-client.gcs] ;; We need to require it to extend the Record there
[gpml.boundary.port.storage-client :as storage-client-ext]
[gpml.db.file :as db.file]
[gpml.util :as util]
Expand Down Expand Up @@ -54,6 +55,7 @@
[{:keys [storage-client-adapter
private-storage-bucket-name
private-storage-signed-url-lifespan]} file]
(prn "get private url method")
(storage-client-ext/get-blob-signed-url storage-client-adapter
private-storage-bucket-name
(:object-key file)
Expand Down

0 comments on commit cb939f0

Please sign in to comment.