"streaming data" means, when we trying upload very big files, is incoming data. i mean, does the client send partial data of file or whole file at once ?
All options are possible, depending on the server. If they allow unlimited connection time, whole file at once is possible. Otherwise, there are three options for partial uploading:
- Transfer-Encoding: chunked
- S3 style multipart upload
- WebSockets / gRPC
The first one is standardized. You just sent chunks until the closing chunk (0\r\n\r\n).
The second one is an application level protocol, which means the server must be coded specifically to handle this. The common flow is:
- Client initiate request, supplying filename
- Server responds with an ID
- Client hits multiple requests, each representing a part of the file, supplying part number and the ID from the response
- Server responds with another ID, usually an ETag, for each successfully uploaded part
- Client completes the request by sending an XML request with a part number - ETag pair, for confirmation
- Server constructs the complete file based on the XML information and send response with whatever considered useful
Of course you can omit the completion request, stating the number of parts at the initial request, or maybe change the XML to JSON, works, too. It's application level, meaning you're in control.
The third and the last one is like a pure socket, the protocol is bidirectional so through the same "tunnel" you can pass data as you wish continuously. Each has different implementation, though, so feel free to read and understand how each works.