Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference Between Base64 and Multipart?

Can any one explain what is the advantage of Base64 as well Multipart

I know Multipart is faster then Base64...

But still many developers are using Base64...I studied both documentation but i am not clear

like image 263
demo Avatar asked Nov 03 '17 12:11

demo


People also ask

Does multipart form data use Base64?

cases, binary multipart/form-data data is encoded as base64.

What is the purpose of Base64?

Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with ASCII. This is to ensure that the data remain intact without modification during transport.

What is the difference between binary and Base64?

Base64 image representation can be directly placed within html to render an image. Binary takes up less space. And benefits from greater network effects and standardization. E.g. if you want to use amazon simple secure storage S3 you have to store a binary file.

What is difference between ASCII and Base64?

Difference between ASCII and base64When you encode text in ASCII, you start with a text string and convert it to a sequence of bytes. When you encode data in Base64, you start with a sequence of bytes and convert it to a text string.


2 Answers

Base64
Base64 is a way to encode binary data into an ASCII character format by translating it into a radix-64 representation.
I recommend you that never use Base64 for large file/data upload to server beacuse it's convert whole data and post it to server.

Multipart
Multipart is a way to upload file/data to server in the form of part which are in bytes. Multpart/form-data is applied to a form though, so you can send everything in a multi-part form, including "regular" data also.

like image 197
Maraj Hussain Avatar answered Oct 25 '22 20:10

Maraj Hussain


Multipart ist a part of the http protocol. See

https://stackoverflow.com/a/19712083/5694629

Base64 is a way to convert arbitrary content into a serializable form for transmission.

like image 27
pat_b13 Avatar answered Oct 25 '22 19:10

pat_b13