looks like when something is sent as base64, it is checked against the length limit /before/ the base64 is decoded. 975 byte PNG base64s into 1318 bytes and fails to upload. also, had to apt-get install php-curl which wasn't in the instructions.