I am trying to add property groups to a file with
https://content.dropboxapi.com/2/files/upload
and I am getting an error "HTTP header "Dropbox-API-Arg": property_groups: expected list, got string". How is my property groups a string? What am I doing wrong?
$meta = array(
"name" => "this is something"
);
$fields = array(
"path" => "/ba.txt",
"autorename" => false,
"mode" => "overwrite",
"mute" => false,
"strict_conflict" => false,
"property_groups" => json_encode($meta)
);
$headers = array(
'Authorization: Bearer '.$auth_token,
'Content-Type: application/octet-stream',
'Dropbox-API-Arg: '.json_encode( $fields )
);