You will need to design your own protocol for communication between the device and the server. Have a look at the below response from server:
In this response from server '0' is the return code, 'OK' is the message, '16' is the lenght of the response in bytes. With this kind of protocol you will be able to tell how big you data is and implement a progress indicator.
Hope this helps.