public function addFileContent($name, $content, $options = [])
    {
        if (!isset($options['mimeType'])) {
            $options['mimeType'] = 'application/octet-stream';
        }
        if (!isset($options['fileName'])) {
            $options['fileName'] = $name . '.dat';
        }
        return $this->addContent($name, $content, $options);
    }
public function addFileContent($name, $content, $options = [])
    {
        if (!isset($options['mimeType'])) {
            $options['mimeType'] = 'application/octet-stream';
        }
        if (!isset($options['fileName'])) {
            $options['fileName'] = $name . '.dat';
        }
        return $this->addContent($name, $content, $options);
    }
public function addFileContent ( $ name , $ content , $ options = [ ] ) { if ( ! isset ( $ options [ 'mimeType' ] ) ) { $ options [ 'mimeType' ] = 'application/octet-stream' ; } if ( ! isset ( $ options [ 'fileName' ] ) ) { $ options [ 'fileName' ] = $ name . '.dat' ; } return $ this -> addContent ( $ name , $ content , $ options ) ; }
Adds a string as a file upload.
@see addContent()
@param string $name part (form input) name
@param string $content file content.
@param array $options content part options, valid options are:
- fileName - string, base name of the uploading file.
- mimeType - string, file mime type, if not set it 'application/octet-stream' will be used.
@return $this
Adds a string as a file upload .