Upload Image using API proxy

Hi Every One ,

Can anyone help me how i can upload image in API proxy from local system by enabling the stream.

Solved Solved
0 2 908
1 ACCEPTED SOLUTION

Hi ,

One of the solution is to cater Images in Body as "BINARY"

If you want to get Image in request you can choose BINARY option from postman, this will allow you to choose a file from your system and will cater in a request , from there you can send and retrieve request of Images.

Thanks,

Haider

View solution in original post

2 REPLIES 2

We can try to help, but before we can provide much help, you will need to provide more specific information regarding what you would like to do.

"Upload an image" - the wording you use is a bit out of place. "Upload" to me denotes a webpage / user experience, as if I am uploading an image to Facebook or something like that. "upload" suggests a user interaction and a user interface.

But you are asking about APIs. When we discuss APIs, we intentionally focus on the system-to-system interaction, not the user interaction. One system is the client, one is the server. There is a client app, and via an API call the client app can send a payload to the server. In the case of Apigee Edge, there's an API Proxy interposed between client and server. We don't normally speak of "upload" when using this client-server (or system-to-system) metaphor to describe the situation. The whole interaction might be an "image upload" from the human perspective, but when we look at the exchange as an API call, the data is just a payload.

The payload sent with the API request can contain anything. Typical content-types may be application/json or application/xml, but if the client and server agree, then the payload might also be application/octet-stream , which would indicate a binary stream of bytes. This might be an appropriate content-type for transmitting an image or other binary file.

With that background, Where, specifically, are you having difficulty?

What have you tried? What results did you expect? What results did you actually see?

Hi ,

One of the solution is to cater Images in Body as "BINARY"

If you want to get Image in request you can choose BINARY option from postman, this will allow you to choose a file from your system and will cater in a request , from there you can send and retrieve request of Images.

Thanks,

Haider