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.
public setFileUpload ( string $filename, string $formname, string $data = null, string $ctype = null ) : Zend_Http_Client | ||
$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) |
리턴 | Zend_Http_Client |