Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

fix(pinterest): upload the mp4 file for video pins instead of the first media item

Gilad Resisibe413ec29ff9
diff --git a/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts b/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts
index 4f416cc41..c8e626824 100644
--- a/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts
@@ -270,12 +270,9 @@ export class PinterestProvider
})
).json();
- const { data, status } = await axios.get(
- postDetails?.[0]?.media?.[0]?.path!,
- {
- responseType: 'stream',
- }
- );
+ const { data, status } = await axios.get(findMp4.path, {
+ responseType: 'stream',
+ });
const formData = Object.keys(upload_parameters)
.filter((f) => f)