(entry) =>
E.gen(function* () {
const Key = `images/${flattenFilePath(entry.path, decompilerOutputsPath)}`;
yield* E.logInfo(`Saving image: ${Key} to Object Storage`);
const Body = yield* E.tryPromise({
try: () => Deno.readFile(entry.path),
catch: (e) => new Error("Couldn't read file", { cause: e }),
});
yield* putObject(Body, Key, "image/png");
}).pipe(E.retry({ times: 3 }))
(entry) =>
E.gen(function* () {
const Key = `images/${flattenFilePath(entry.path, decompilerOutputsPath)}`;
yield* E.logInfo(`Saving image: ${Key} to Object Storage`);
const Body = yield* E.tryPromise({
try: () => Deno.readFile(entry.path),
catch: (e) => new Error("Couldn't read file", { cause: e }),
});
yield* putObject(Body, Key, "image/png");
}).pipe(E.retry({ times: 3 }))