Skip to content

Commit

Permalink
test debugging2
Browse files Browse the repository at this point in the history
  • Loading branch information
Firgrep committed Jun 2, 2024
1 parent cfcdb79 commit b0a9c69
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ func generateV4GetObjectSignedURL(w http.ResponseWriter, bucket, object string,
}
fmt.Println("==func=bucket:", bucket)
fmt.Println("==func=object:", object)
blob := client.Bucket(bucket).Object(object)

// Check if the object exists
_, err := blob.Attrs(ctx)
if err != nil {
fmt.Fprintf(w, "No object found: %s", http.StatusText(http.StatusNotFound))
return "", nil
}
// blob := client.Bucket(bucket).Object(object)

// // Check if the object exists
// _, err := blob.Attrs(ctx)
// if err != nil {
// fmt.Fprintf(w, "No object found: %s", http.StatusText(http.StatusNotFound))
// return "", nil
// }

u, err := client.Bucket(bucket).SignedURL(object, opts)
if err != nil {
Expand Down

0 comments on commit b0a9c69

Please sign in to comment.