How in the world do I upload a file using the example PHP code format:
$update_id = "XXXXXX";
$query = "
mutation {
add_file_to_update (update_id: ".$update_id.", $file: !File) {
id
}
}";
$data = @file_get_contents($endpoint.'file', false, stream_context_create([
'http' => [
'method' => 'POST',
'header' => $endpoint_headers_file,
'content' => json_encode(['query' => $query]),
]
]));