Is the file uploaded by the browser transferred in bytes (serialized? )?

because the file is not guaranteed to be divisible by 8 bits, when the input uploaded by the file is followed by the text upload, it will result in a text reading error, right?
such as

<form action="reg" method="post" enctype="multipart/form-data">
    <input type="text" name="username" id="username" />
    <input type="file" accept="audio/mp4, video/mp4" name="updateFile" />
    <input type="text" name="sex" id="sex" />
    <input type="submit /">
</form>

when the file is not divisible by 8, then the following text is garbled.
if the browser automatically fills it to a multiple of 8, it won"t affect the rest of the problem, but the file is not the original file and may be added by 1 byte, right?
so will the browser fill the file or not? That is, is it transmitted in bytes? Is there a provenance?

add: there is an answer that files are all in bytes.
about serialization, since files are in bytes, what"s the point of file serialization on the browser side?


https://tools.ietf.org/html/r...


A file must be an entire byte (the file's bit length is divisible by 8)

< hr >

you not only need to upload files, but also other parameters. For example, your username and sex
serialized files are also directly uploaded in binary. Grab a request and have a look.


hear for the first time that there will be several extra bits in the file

Menu