NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Interface PostFileInterface

POST file upload

### Direct known implementers

`Guzzle\Http\Message\PostFile`

Namespace: Guzzle\Http\Message
Located at Guzzle/Http/Message/PostFileInterface.php

## Methods summary

- `public` `setFieldName ( string $name )`

  Set the name of the field

- `public` `getFieldName ( )`

  Get the name of the field

- `public` `setFilename ( string $path )`

  Set the path to the file

- `public` `setPostname ( string $name )`

  Set the post name of the file

- `public` `getFilename ( )`

  Get the full path to the file

- `public` `getPostname ( )`

  Get the post name of the file

- `public` `setContentType ( string $type )`

  Set the Content-Type of the file

- `public` `getContentType ( )`

  Get the Content-Type of the file

- `public` `getCurlValue ( )`

  Get a cURL ready string or CurlFile object for the upload

## Methods detail

# `public `Guzzle\Http\Message\PostFileInterface``
`setFieldName( string $name )`

Set the name of the field

#### Parameters

$name
  `string`
  $name Field name

#### Returns

``Guzzle\Http\Message\PostFileInterface``
# `public string`
`getFieldName( )`

Get the name of the field

#### Returns

`string`
# `public `Guzzle\Http\Message\PostFileInterface``
`setFilename( string $path )`

Set the path to the file

#### Parameters

$path
  `string`
  $path Full path to the file

#### Returns

``Guzzle\Http\Message\PostFileInterface``

#### Throws

``Guzzle\Common\Exception\InvalidArgumentException``
if the file cannot be read
# `public `Guzzle\Http\Message\PostFileInterface``
`setPostname( string $name )`

Set the post name of the file

#### Parameters

$name
  `string`
  $name The new name of the file

#### Returns

``Guzzle\Http\Message\PostFileInterface``
# `public string`
`getFilename( )`

Get the full path to the file

#### Returns

`string`
# `public string`
`getPostname( )`

Get the post name of the file

#### Returns

`string`
# `public `Guzzle\Http\Message\PostFileInterface``
`setContentType( string $type )`

Set the Content-Type of the file

#### Parameters

$type
  `string`
  $type Content type

#### Returns

``Guzzle\Http\Message\PostFileInterface``
# `public string`
`getContentType( )`

Get the Content-Type of the file

#### Returns

`string`
# `public string`
`getCurlValue( )`

Get a cURL ready string or CurlFile object for the upload

#### Returns

`string`

### Magic methods summary