Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix(SKY-9643): convert file:// signed_url to artifact server URL (#5873)
Celal Zamanoğlucfcc1d650b70
diff --git a/skyvern-frontend/src/routes/tasks/detail/artifactUtils.ts b/skyvern-frontend/src/routes/tasks/detail/artifactUtils.tsindex 9ce246777..59f2d83d6 100644--- a/skyvern-frontend/src/routes/tasks/detail/artifactUtils.ts+++ b/skyvern-frontend/src/routes/tasks/detail/artifactUtils.ts@@ -2,13 +2,11 @@ import { ArtifactApiResponse, TaskApiResponse } from "@/api/types";import { artifactApiBaseUrl } from "@/util/env";export function getImageURL(artifact: ArtifactApiResponse): string {- if (artifact.signed_url) {- return artifact.signed_url;+ const url = artifact.signed_url ?? artifact.uri;+ if (url.startsWith("file://")) {+ return `${artifactApiBaseUrl}/artifact/image?path=${encodeURIComponent(url.slice(7))}`;}- if (artifact.uri.startsWith("file://")) {- return `${artifactApiBaseUrl}/artifact/image?path=${artifact.uri.slice(7)}`;- }- return artifact.uri;+ return url;}export function getScreenshotURL(task: TaskApiResponse) {@@ -16,7 +14,7 @@ export function getScreenshotURL(task: TaskApiResponse) {return;}if (task.screenshot_url?.startsWith("file://")) {- return `${artifactApiBaseUrl}/artifact/image?path=${task.screenshot_url.slice(7)}`;+ return `${artifactApiBaseUrl}/artifact/image?path=${encodeURIComponent(task.screenshot_url.slice(7))}`;}return task.screenshot_url;}@@ -26,7 +24,7 @@ export function getRecordingURL(task: TaskApiResponse) {return null;}if (task.recording_url?.startsWith("file://")) {- return `${artifactApiBaseUrl}/artifact/recording?path=${task.recording_url.slice(7)}`;+ return `${artifactApiBaseUrl}/artifact/recording?path=${encodeURIComponent(task.recording_url.slice(7))}`;}return task.recording_url;}