curl: argument list too long
This is coming up because you are trying to pass the entirety of the base64'd content on the command line. curl
has the ability to load in data to POST from a file, which I'd recommend doing. More information can be found in the man page, but the basic format is this:
curl -X POST -d @filename.txt https://website.com/path
According to the curl manual, the -F option allows you to encode a file for base64, but limits the output to 76 characters. Ex: -F '=@localfile;encoder=base64'