This a question from the 1st round of Senior Java Engineer interview.
The others questions are as usual, like explain HTTP GET/POST, RESTful API, HashMap vs ConcurrentHashMap, synchronized vs ReentrantLock.
Then the interviewer asked me this question: Explain how does the server know the file upload is finished.
I said: "The server can read from InputStream, after reading is finished, then the file upload is finished".
He said: "please show me more details".
I said: "I don't know too much about it, what do you really want to know?".
He said: "Let's move to the next question".
Then I lost this offer because HR said I was not answering well enough for this question.
What should I have answered?