-
-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Description
PHP 8.1 adds a new CURLStringFile
, that makes it possible to upload a file directly from a variable. With existing CURLFile
, it is required to specify a path or a URI (that allows data://
fortunately).
- cURL: make possible to send file from buffer string php/php-src#6456
- PHP 8.1: Curl: File uploads from strings with CURLStringFile
There is a polyfill that I created and tested manually. It works by encoding the passed data into a data://
URI within the constructor, and setting them into properties of a CURLFile
subclass.
I would like to ask if a CURLStringFile
polyfill would fit Symfony Polyfill project. If it does, I'd happily send a PR :)
Thank you.
Metadata
Metadata
Assignees
Labels
No labels