rapid-manchester-41665
07/27/2023, 5:44 AM${imageUrl} downloaded successfully.
);
return imageUrl;
});
} catch (error) {
console.error(Error in downloadImage: ${error}
);
throw error;
}
}rapid-manchester-41665
07/27/2023, 5:47 AMrapid-manchester-41665
07/27/2023, 3:21 PMacceptable-kangaroo-64719
07/27/2023, 3:24 PMrapid-manchester-41665
07/28/2023, 3:47 PMearly-train-33247
07/28/2023, 10:02 PMearly-train-33247
07/28/2023, 10:03 PMrapid-manchester-41665
07/28/2023, 10:35 PMrapid-manchester-41665
07/28/2023, 10:35 PMrapid-manchester-41665
07/28/2023, 11:09 PMearly-train-33247
07/30/2023, 12:50 AMrapid-manchester-41665
07/31/2023, 6:00 PMrapid-manchester-41665
08/01/2023, 6:35 PMcolossal-egg-20510
08/01/2023, 8:15 PMthe bot can’t process media like this
is because the function you are calling is available in browsers but not in our runtime environment. We are currently working on a solution to upload file and store them. In the mean time, you can try using axios to download and upload the content from one server to the other without using the FileReader
api.rapid-manchester-41665
08/01/2023, 8:19 PMcolossal-egg-20510
08/01/2023, 8:58 PMimgBB
you can skip the step of downloading the image. You could just provide the url to imgBB
. This example should work for you. Make sure to replace the apikey
and workflow variables
for your own. 🚀
const downloadUrl = workflow.imageUrl
const uploadUrl = `https://api.imgbb.com/1/upload?key=${env.apiKey}`
var bodyFormData = new FormData();
bodyFormData.append('image', downloadUrl)
await axios.post(uploadUrl, bodyFormData)
rapid-manchester-41665
08/01/2023, 11:51 PM