php -r "file_put_contents('php://stdout', file_get_contents('file_to_upload.txt'), false, stream_context_create(['http' => ['method' => 'POST', 'header' => 'Content-Type: multipart/form-data', 'content' => http_build_query(['file' => new CURLFile('file_to_upload.txt')])]]));"
Make sure to replace 'file_to_upload.txt' with the actual path of your file and adjust the URL if needed to point to the correct endpoint.
This assumes you are making a simple POST request to upload the file to a server endpoint. If the server requires more advanced authentication or headers, you'd have to modify the context accordingly.