In this blog we are using Akka-HTTP and Binary protocol to Upload File .
A binary protocol is a protocol which is intended or expected to be read by a machine rather than a human being, as opposed to a plain text protocol such as IRC, SMTP, or HTTP.
Binary protocols have the advantage of terseness, which translates into speed of transmission and interpretation.
Binary protocol is also used in the context of a protocol between exactly two parties, in contrast to a multi-party protocol.Binary protocol, or binary collaboration have been used in the terminology of standards such as EbXML and EDOC. An interface in UML  may also be considered a binary protocol.
With the help of binary protocol and Akka-HTTP we developed a mini project which can upload file.
- To upload file using binary protocol we are using DWST(Dark WebSocket Terminal) .
- Server is running on localhost:3000 .
You can find complete code Here
Connect with server using DWST command /connect ws://localhost:3000/upload
Hit /loadbin command on DWST to upload file this will open you picture folder.
Select an image which you want to Upload .
After seletcting file you will get a message, Binary file loaded to “default”
Now you file is loaded at default location of DWST . Now hit /binary [bin] to upload file on server .
Now your file is uploaded on the server at /tmp directory.