Context: uploading images to WordPress.
I've been digging around on this for a while. There are lots of StackOverflow postings about the issue, including this one from which I have derived the code below.
function test3() {
const png = DriveApp.getFileById('id of a png file')
const parm = {};
parm.method
…
Top comments (1)
In this case, the "problem" was with Sucuri which needed to be told to whitelist googlecontent IP addresses, namely
107.178.0.0/16
. Once Sucuri stopped blocking the traffic, the image was uploaded.