Skip to content

[BUG][php] PHP api client is not working for file uploads #21485

@jozefbriss

Description

@jozefbriss

There seems to be 2 issues:

  1. The content is incorrect. Stringified PHP resource is included instead of the actual content of the file.
  2. There is missing filename field in Content-Disposition header.

This is relevant part of the request by generated API. I have provided an instance of SplFileObject as an input for file field.

--boundary
Content-Disposition: form-data; name="file"

Resource id #202

The request should have been something like this looks like this.

--boundary
Content-Disposition: form-data; name="file"; filename="filename.txt"

[Actual content of the file not the stringified resource]

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