add azure blob storage (#4338)

Signed-off-by: Benji Visser <benji@093b.org>
Co-authored-by: Benji Visser <benji@093b.org>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
Shuchang Zheng
2025-12-20 00:16:16 +08:00
committed by GitHub
parent 71db86cbf0
commit 55f366ba93
17 changed files with 1641 additions and 136 deletions

View File

@@ -54,6 +54,9 @@ type Props = {
function Artifact({ type, artifacts }: Props) {
function fetchArtifact(artifact: ArtifactApiResponse) {
if (artifact.signed_url) {
return axios.get(artifact.signed_url).then((response) => response.data);
}
if (artifact.uri.startsWith("file://")) {
const endpoint = getEndpoint(type);
return artifactApiClient
@@ -64,9 +67,6 @@ function Artifact({ type, artifacts }: Props) {
})
.then((response) => response.data);
}
if (artifact.uri.startsWith("s3://") && artifact.signed_url) {
return axios.get(artifact.signed_url).then((response) => response.data);
}
}
const results = useQueries({

View File

@@ -2,10 +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;
}
if (artifact.uri.startsWith("file://")) {
return `${artifactApiBaseUrl}/artifact/image?path=${artifact.uri.slice(7)}`;
} else if (artifact.uri.startsWith("s3://") && artifact.signed_url) {
return artifact.signed_url;
}
return artifact.uri;
}

View File

@@ -63,7 +63,7 @@ const headersTooltip =
const bodyTooltip =
"Request body as JSON object. Only used for POST, PUT, PATCH methods.";
const filesTooltip =
'Files to upload as multipart/form-data. Dictionary mapping field names to file paths/URLs. Supports HTTP/HTTPS URLs, S3 URIs (s3://), or limited local file access. Example: {"file": "https://example.com/file.pdf"} or {"document": "s3://bucket/path/file.pdf"}';
'Files to upload as multipart/form-data. Dictionary mapping field names to file paths/URLs. Supports HTTP/HTTPS URLs, S3 URIs (s3://), Azure blob URIs (azure://), or limited local file access. Example: {"file": "https://example.com/file.pdf"} or {"document": "s3://bucket/path/file.pdf"}';
const timeoutTooltip = "Request timeout in seconds.";
const followRedirectsTooltip =
"Whether to automatically follow HTTP redirects.";