I have to send files from my php back end to an API as form-data objects. These files were created directly in the back end and the sending is not associated with any HTML form.
The API documentation provides an example of sending a form-data object but in python, here it is:
files=[
('file',('owl-50267_1920.jpg',open('dataset/img/owl-1.jpg','rb')))
]
How can I do the same thing in php ? Thank you