MCPcopy Create free account
hub / github.com/027xiguapi/code-box / fetchImage

Function fetchImage

background/messages/download.ts:10–17  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

8 const zip = new JSZip()
9
10 const fetchImage = (url) => {
11 return fetch(url)
12 .then((response) => response.blob())
13 .then((blob) => {
14 const fileName = url.split("/").pop().split("?")[0]
15 return { blob, fileName }
16 })
17 }
18
19 Promise.all(imageUrls.map(fetchImage))
20 .then((results) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected