How do servers exchange files, for example, pictures, how are pictures transmitted? In the form of text reads and transmits them, or how?

What ways to do it, I know, just wondering how it happens

  • one
    in the same way as your browser downloads data from the server. you request data by reference, the server sends you a data type (picture!) in the http header, respectively, you know that since this is a picture, not a text, you need to put it in a folder with pictures, rather than writing it in a database, let's say. if you don't pass the mime type, you can simply take the raw data and merge it somewhere. server do not care, it's a picture or text. received bytes, saved / forwarded bytes / reported an error. read about the protocol http - strangeqargo
  • one
    Files are transmitted in bytes, with text headers. More details can be found even here ru.wikipedia.org/wiki/HTTP, not counting the documentation. - Dmitriy
  • Another option is through the database. - Vladimir Gamalyan
  • That is, as I understand it, even if the picture is - it is converted into a “text” and transmitted, but is it already determined by type that this is a picture? - user190134
  • one
    In the smtp protocol, pictures are distilled in Base64. And then decode. And so looking how servers are written. I can open a connection and send in groups of bytes. I can decode again in string. - Maxim Drobyshev

0