Zend_Http_Client::setFileUpload
Set a file to upload (using a POST request)
Can be used in two ways: 1. $data is null (default): $filename is treated as the name if a local file which will be read and sent. Will try to guess the content type using mime_content_type(). 2. $data is set - $filename is sent as the file name, but $data is sent as the file contents and no file is read from the file system. In this case, you need to manually set the content-type ($ctype) or it will default to application/octet-stream.
Signature
public function setFileUpload(string
$filename,
string
$formname,
[string
$data = NULL,
[string
$ctype = NULL]] )
Parameters
$filename
— string- Name of file to upload, or name to save as
$formname
— string- Name of form element to send as
$data
— string- Data to send (if null, $filename is read and sent)
$ctype
— string- Content type to use (if $data is set and $ctype is
null, will be application/octet-stream)
Returns
- Zend_Http_Client