tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
291
fork
atom
a tool for shared writing and social publishing
291
fork
atom
overview
issues
28
pulls
pipelines
add some logging sequential image upload
awarm.space
6 months ago
90476728
d2118523
+10
-4
1 changed file
expand all
collapse all
unified
split
actions
publishToPublication.ts
+10
-4
actions/publishToPublication.ts
···
89
89
let data = await fetch(b.data.src);
90
90
if (data.status !== 200) continue;
91
91
let binary = await data.blob();
92
92
-
let blob = await agent.com.atproto.repo.uploadBlob(binary, {
93
93
-
headers: { "Content-Type": binary.type },
94
94
-
});
95
95
-
imageMap.set(b.data.src, blob.data.blob);
92
92
+
try {
93
93
+
let blob = await agent.com.atproto.repo.uploadBlob(binary, {
94
94
+
headers: { "Content-Type": binary.type },
95
95
+
});
96
96
+
imageMap.set(b.data.src, blob.data.blob);
97
97
+
} catch (e) {
98
98
+
console.error(e);
99
99
+
console.log("Error uploading image: " + b.data.src);
100
100
+
throw new Error("Failed to upload image");
101
101
+
}
96
102
}
97
103
98
104
let b: PubLeafletPagesLinearDocument.Block[] = blocksToRecord(