mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
(ts) override type check on bluesky uploadBlob because a ReadStream appears to work fine
This commit is contained in:
parent
57f376e5ee
commit
0087cd734b
@ -126,7 +126,7 @@ const publishers: Publishers = {
|
||||
const media = [];
|
||||
if (image) {
|
||||
try {
|
||||
const uploadResponse = await agent.uploadBlob(image, { encoding: 'image/png' });
|
||||
const uploadResponse = await agent.uploadBlob(image as unknown as Blob, { encoding: 'image/png' });
|
||||
console.log(uploadResponse);
|
||||
media.push(uploadResponse.data.blob);
|
||||
} catch (error) {
|
||||
@ -186,7 +186,7 @@ const previousId: Partial<PublisherIds> = {};
|
||||
const publish = async <P extends keyof PublisherIds>(publisher: P, message: string, locale: string) => {
|
||||
console.log(`Publishing: ${publisher}`);
|
||||
|
||||
let imageStream = null;
|
||||
let imageStream: ReadStream | null = null;
|
||||
try {
|
||||
imageStream = fs.createReadStream(imageTmpPath);
|
||||
} catch { void 0; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user