File upload from Android (via Multipart Form data)

Updated 28 July 2023


Most of the time we have to upload our file on server from our Application but when we try to find a way we got all the different ways to do so that make us more confused. Some says to use some library and some says not to. So here is a method to upload a file to the server via Http Multi-part form data, it doesn’t need any external library and is quiet efficient as well.

Through it you can have a put request to send you file with extra data like in my case I have to send an additional reference tag along with it. So lets start. Here I am supposing that you have a File Adapter and you have selected the file you have to send. Basically you have the URI of the file. If you don’t please follow theĀ  link.

So here are you. with this code you can send your file to server with extra form data.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


  • Android: Get an image from device - Mobikul
  • Sarith Nob
    • aastha gupta
  • Sarith Nob
    • aastha gupta
  • Rizwan
  • fayzal
    • anchit (Moderator)
  • Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home