, - - "DONE", , :
Bytes written to socket OutputStream
============================|
<--> Buffering |
Bytes sent by TCP stack |
============================
<------> Network latency|
Bytes received by Tomcat
============================
| (Tomcat waits for all data to finish uploading
| before handing it out as "parts" for your code)
| File written to local file on server
| =====
|
| Response "DONE" written by servlet to socket output
| ==
| <---> Network latency
| == Response "DONE" received by client
| |
| |
"100%" for entity wrapper ^ Actual 100% ^
Discrepancy
<----------------------->
"Twilight Zone" : part of discrepancy you cannot do much about.
(progress feedback impossible without using much lower level APIs)
<--------------------->
, , , , , .
, .
, :
- ( ) (, ) / Java
- () (, ) / Java
- ( ) zip
- ()
- ( ) ()
, "upload complete" 90% 90 100, . 0% 90% "Uploading", , "...", , throbber, , 100%.
, . , , "" 100% ( ), .
" " , , , , " ?" ( ). , , ( , ).
/ , . , API (, @MultipartConfig ..), - ( ), , 1% , ( , , ). . , , :
- POST, , 90% (.. 50%, 45%)
- , 91%, 95%, , 100%.
, ( 100% , ), , , ( 90% , 91/92/... 99/100 ).
, , . 17 , , , - . , , , 50 , - , .