MobileDev
MobileDev

Reputation: 176

Netty - how to receive and response image over http?

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

Answers (2)

Veebs
Veebs

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

forty-two
forty-two

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

Related Questions