[android-components](../../../index.md) / [mozilla.components.concept.fetch](../../index.md) / [Request](../index.md) / [Body](index.md) / [fromFile](./from-file.md)

# fromFile

`fun fromFile(file: `[`File`](https://developer.android.com/reference/java/io/File.html)`): `[`Body`](index.md) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/concept/fetch/src/main/java/mozilla/components/concept/fetch/Request.kt#L68)

Create a [Body](index.md) from the provided [File](https://developer.android.com/reference/java/io/File.html).

