Reputation: 176
May I know how Netty works with Image over http? Any sample or tutorial?
Basically I want to know:
1) how to receive client's uploaded image
2) how to reply image by http response
Upvotes: 1
Views: 2791
Reputation: 2388
Here is the example for receiving uploaded files.
Here is the example for serving any type of files, including image files.
Hope this helps.
Upvotes: 1
Reputation: 12817
Image data is just like any other data; a stream of bytes (or octets, to be precise) that is meaningful in terms of the Content-Type, e.g. image/jpeg. Note also that the Content-Encoding might be of interest to handle compression/uncompression. There should be enough informaion in the example sources on netty.io to get you going.
Upvotes: 0