先取得授权下载凭据,再通过独立请求校验文件大小和 SHA-256。向用户提供文件前,应用仍须核实其与业务任务的归属关系。
查看对应 HTTP 契约ArtifactsResource
classexport class ArtifactsResourceconstructor
constructor(client: OrbitSpaceClient);download
download(id: string, options: ArtifactDownloadOptions): Promise<ArtifactContent>;get
get(id: string, options?: ResourceCallOptions): Promise<ArtifactServiceGetArtifactResponses[200]>;getDownload
getDownload(id: string, options?: ResourceCallOptions): Promise<ArtifactServiceGetArtifactDownloadResponses[200]>;list
list(query?: NonNullable<ArtifactServiceListArtifactsData["query"]>, options?: ResourceCallOptions): Promise<ArtifactServiceListArtifactsResponses[200]>;downloadArtifactContent
functionexport function downloadArtifactContent(receipt: ArtifactDownload, options: ArtifactDownloadOptions & {
destinations: readonly ArtifactDestination[];
}): Promise<ArtifactContent>;export type ArtifactDownloadOptions = {
signal: AbortSignal;
maxBytes: number;
destinations?: readonly ArtifactDestination[];
fetch?: typeof globalThis.fetch;
};export type ArtifactDestination = {
origin: string;
pathPrefix: string;
};ArtifactContent
typeexport type ArtifactContent = {
bytes: Uint8Array;
checksumSha256: string;
sizeBytes: string;
contentType?: string;
};下载方法索引 JSON ↓ · 来源摘要 5f558e57b94420ef8fc60d9a8274a2ab5b92ac85d23f370a5bac4bc7ad2baae2