Answer the question
In order to leave comments, you need to log in
How to upload a file to the PC that the server gives?
I am making a request to the server (sending a file). The server does something with this file and returns it in binary form. How can I assemble this file (binary), which has already come to the client, into .exe, so that the client downloads it to himself through the browser?
Answer the question
In order to leave comments, you need to log in
you have something wrong with the concepts .
the browser does not convert anything to "binary form". The file is already "binary".
the browser simply takes the file and sends it as is with a POST request to where you specified.
and if you receive a response from that server with bugs, this is already a problem with the response headers from that server. The browser needs to be told that it is downloading the file, not the text.
Well, the browser is not a compiler.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question