Open
Changes from all commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -627,6 +627,18 @@ 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: '/path/to/uploaded/file',
encoding: 'base64'
);

.. versionadded:: 6.3

The `encoding` parameter was introduced in Symfony 6.3.

.. tip::

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