I've been trying for a while to send an image via Postman to a simple PHP script that should display the sent image. The steps I followed were:
Postman "client" side:
- Select POST request
- Select HEADER Content-Type with value multipart/form-data
- In the Body tab select form-data introduce the key = image_test, change from Text to File and search for a image, ex: photo.png
- Send POST request.
In the PHP script I just have:
echo '<img src="data:multipart/form-data,' . $_POST['image_test'] .'"/>';
This solution isn't working for me although with print_r($_POST)
I'm able to see the encoded image. Could this be a problem of the host (https://ide.c9.io) or Postman? I made some other tests with Postman and base64 images and the Display tab of Postman wasn't able to display the decoded images; the only way was to access through the browser.