package telegraml
Module TelegramApi.InputFileSource
Used for handling, loading, and sending outgoing files in messages
Loads a file (by filename) and returns the raw bytes inside of it
Used to format data as HTTP multipart/form-data Takes:
- A list of fields to be included in the form data as a pair of strings (name, value)
A tuple of:
- The name of the data field
- The path to the file/the file's name
- The mime type of the file
- A string to be used as a boundary to split different parts of the data; ideally, this text should not be present in the raw data of the file being sent
Source
val multipart_body :
(string * string) list ->
(string * string * string) ->
string ->
string Lwt.tUsed to format data as HTTP multipart/form-data Takes:
- A list of fields to be included in the form data as a pair of strings (name, value)
A tuple of:
- The name of the data field
- The path to the file/the file's name
- The mime type of the file
- A string to be used as a boundary to split different parts of the data; ideally, this text should not be present in the raw data of the file being sent