DEV Community

Bruce Axtens
Bruce Axtens

Posted on

Wordpress says, "rest_upload_sideload_error" for a recognized type in an image upload from Google Apps Script. Why?

0

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)

Collapse
 
bugmagnet profile image
Bruce Axtens

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.