Table of content

File Uploading with POSTMAN

You can upload files using API, in the body of the POST method we have to send the file.

For example purpose, we will be using the below API endpoint to upload the files: https://chercher.tech/sample/upload.php

You can verify the file upload by visiting the below URL ( all files deleted every day): https://chercher.tech/sample/files-uploaded/

The file I am trying to upload is :

boy-and-moon

files-upload-postman-post-method

Once you fill the API endpoint for the POST method, go to Body and select Form-data and provide the below details.

KEY : filename and File as type

VALUE : select the file to be uploaded

Description : Not Required.

boy-moon-postman-file-upload

Once you fill the details click on Send button.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions
  • Stemgirl2008
    This upload is failing. I tried uploading a file with this endpoint and this response returned a "fail". 
    
    https://chercher.tech/sample/upload.php
    
    I also verified if it was uploaded and it is not uploading to the following:
    
    https://chercher.tech/sample/files-uploaded/
    
    Please fix this issue if you can. This website is a great learning tool. I have learned a lot about Postman and I will continue with the other topics you have listed.
    
    Thank you in advance
    
    Reply
    • Admin
      Hi StemGirl2008;
      The API endpoint has no problem; please share the screenshot of the postman, so I can tell what is going wrong.
      After your comment, I have used endpoint uploaded another file "add-credential-jenkins.png"
      Reply