Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Commit 6d0a45a

Browse files
Artem LabazinArtem Labazin
authored andcommitted
Correct README.md
1 parent 37893d3 commit 6d0a45a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ In the example above, the `sendPhoto` method uses the `photo` parameter using th
103103

104104
* `File` will use the File's extension to detect the `Content-Type`.
105105
* `byte[]` will use `application/octet-stream` as `Content-Type`.
106-
* `FormData` will use the `FormData`'s `Content-Type`.
106+
* `FormData` will use the `FormData`'s `Content-Type` and `fileName`.
107107

108-
`FormData` is custom object that wraps a `byte[]` and defines a `Content-Type` like this:
108+
`FormData` is custom object that wraps a `byte[]` and defines a `Content-Type` and `fileName` like this:
109109

110110
```java
111-
FormData formData = new FormData("image/png", myDataAsByteArray);
111+
FormData formData = new FormData("image/png", "filename.png", myDataAsByteArray);
112112
someApi.sendPhoto(true, formData);
113113
```
114114

0 commit comments

Comments
 (0)