Skip to content

PHP 8.1 - CURLStringFile #333

@Ayesh

Description

@Ayesh

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).

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions