History log of /PHP-8.2/ext/curl/tests/curl_string_file_upload.phpt (Results 1 – 2 of 2)
Revision Date Author Comments
# 8567bc10 11-Jun-2021 Nikita Popov

Port curl, xml, xsql to use EXTENSIONS (#7140)


# e727919b 26-Nov-2020 Alexander Moskalev

cURL: make possible to send file from buffer string

Add CURLStringFile class which works similarly to CURLFile, but
uploads a file from a string rather than a file. This avoids the
n

cURL: make possible to send file from buffer string

Add CURLStringFile class which works similarly to CURLFile, but
uploads a file from a string rather than a file. This avoids the
need to create a temporary file, or use of a data:// stream.

Basic usage:

$file = new CURLStringFile($data, 'filename.txt', 'text/plain');
curl_setopt($curl, CURLOPT_POSTFIELDS, ['file' => $file]);

Closes GH-6456.

show more ...