MCPcopy Index your code
hub / github.com/ethanniser/NextFaster / uploadImage

Function uploadImage

scripts/makeImages.ts:33–40  ·  view source on GitHub ↗
(imageUrl: string, path: string)

Source from the content-addressed store, hash-verified

31 return json;
32 });
33const uploadImage = (imageUrl: string, path: string) =>
34 Effect.gen(function* () {
35 const res = yield* Effect.tryPromise(() => fetch(imageUrl));
36 const blob = yield* Effect.tryPromise(() => res.blob());
37 return yield* Effect.tryPromise(() =>
38 put(path, blob, { access: "public" }),
39 );
40 });
41
42const main = Effect.gen(function* () {
43 const products = yield* Effect.tryPromise(() =>

Callers 1

makeImages.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected