After several tests, apparently get_object_url requires the Content-Disposition parameter in lowercase.
Note that this does not apply to create_object , which works case-insensitively.
So the working code for above:
$opt = array('response' => array('content-disposition' => 'attachment; "filename=newname.txt"'));
source
share