Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions http_client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,11 @@ according to the ``multipart/form-data`` content-type. The
'body' => $formData->bodyToIterable(),
]);

By default, :class:`Symfony\\Component\\Mime\\Part\\Multipart\\FormDataPart`
will transfer file uploads in binary encoding. But you can enforce Base64::

$fileField = DataPart::fromPath('/path/to/uploaded/file', null, null, 'base64');

.. tip::

When using multidimensional arrays the :class:`Symfony\\Component\\Mime\\Part\\Multipart\\FormDataPart`
Expand Down