There seems to be 2 issues:
- The content is incorrect. Stringified PHP
resource is included instead of the actual content of the file.
- 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]
There seems to be 2 issues:
resourceis included instead of the actual content of the file.filenamefield inContent-Dispositionheader.This is relevant part of the request by generated API. I have provided an instance of
SplFileObjectas an input forfilefield.The request should have been something like this looks like this.