Update download URLs in viewer handlers to use the correct domain
This commit is contained in:
@@ -379,7 +379,7 @@ func viewerHandler(w http.ResponseWriter, r *http.Request, db *database.DB, audi
|
||||
db.LogActivity(r.Context(), userID, orgID, &fileId, "view_file", map[string]interface{}{})
|
||||
|
||||
// Build download URL - using full path for frontend to fetch with auth headers
|
||||
viewUrl := fmt.Sprintf("https://b0esche.cloud/api/orgs/%s/files/download?path=%s", orgID.String(), file.Path)
|
||||
viewUrl := fmt.Sprintf("https://go.b0esche.cloud/orgs/%s/files/download?path=%s", orgID.String(), file.Path)
|
||||
|
||||
// Determine if it's a PDF based on file extension
|
||||
isPdf := strings.HasSuffix(strings.ToLower(file.Name), ".pdf")
|
||||
@@ -430,7 +430,7 @@ func userViewerHandler(w http.ResponseWriter, r *http.Request, db *database.DB,
|
||||
db.LogActivity(r.Context(), userID, uuid.Nil, &fileId, "view_user_file", map[string]interface{}{})
|
||||
|
||||
// Build download URL for user files - using full path for frontend to fetch with auth headers
|
||||
viewUrl := fmt.Sprintf("https://b0esche.cloud/api/user/files/download?path=%s", file.Path)
|
||||
viewUrl := fmt.Sprintf("https://go.b0esche.cloud/user/files/download?path=%s", file.Path)
|
||||
|
||||
// Determine if it's a PDF based on file extension
|
||||
isPdf := strings.HasSuffix(strings.ToLower(file.Name), ".pdf")
|
||||
|
||||
Reference in New Issue
Block a user