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?


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 = {};

Top comments (1)

bugmagnet profile image
Bruce Axtens

In this case, the "problem" was with Sucuri which needed to be told to whitelist googlecontent IP addresses, namely Once Sucuri stopped blocking the traffic, the image was uploaded.