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:
@@ -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({
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user