Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9186053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:25:48+00:00 2026-06-17T19:25:48+00:00

In my application i want to add image array to server public void executeMultipartRequest(String

  • 0

In my application i want to add image array to server

public void executeMultipartRequest(String eqname, String eqdesc,String CatId,String eqserial){
try{
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     bm.compress(CompressFormat.JPEG, 75, bos);
     byte[] data = bos.toByteArray();
     HttpClient httpClient = new DefaultHttpClient();
     ByteArrayBody bab = new ByteArrayBody(data, "forest.jpg");
      String urlPath= "http://njjjjjbjjb.com/bbbbbbbb/interface/m.php?method=add";

      System.out.println("URL Path is "+urlPath);

     HttpPost postRequest = new HttpPost(urlPath);
     MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
     reqEntity.addPart("userid", new StringBody(FalconGearApp.getInstance().getUserId()));
     reqEntity.addPart("sid", new StringBody(FalconGearApp.getInstance().getSessionId()));
     reqEntity.addPart("categoryid",new StringBody( CatId));
     reqEntity.addPart("eqname",new StringBody( eqname));
     reqEntity.addPart("eqdescription",new StringBody( eqdesc));
     reqEntity.addPart("eqserial", new StringBody(eqserial));
     reqEntity.addPart("eqphoto", bab);
     reqEntity.addPart("eqphoto", bab);
     reqEntity.addPart("eqphoto", bab);

     postRequest.setEntity(reqEntity);
     HttpResponse response = httpClient.execute(postRequest);
     BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), "UTF-8"));
     String sResponse;
     StringBuilder s = new StringBuilder();
     while ((sResponse = reader.readLine()) != null) {

                         s = s.append(sResponse);

                     }

                     System.out.println("Response is: " + s);



}catch(Exception e){
    e.printStackTrace();


}



 }

Using above code I am able to upload single Image , but I want to upload Image Array so please help how can I upload Image Array,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:25:50+00:00Added an answer on June 17, 2026 at 7:25 pm

    Try with this :

    reqEntity.addPart("eqphoto[0]", bab0);
    reqEntity.addPart("eqphoto[1]", bab1);
    reqEntity.addPart("eqphoto[2]", bab2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi an developing drawing android application. in that i want to add a sticker(image)
I have a navigation based application. I want to add an image covering the
Basically I have an image in my application that I want to add hover
i want to add image in the webos application and want to add click
I want to add an Image dynamically to the wpf application. What I have
I have one image and one button in my application. i want to add
I want to add an image in my application which is like a road
In my application i want to add more than two markers in a Google
In my application I want to add a simple animation to buttons and other
In my web application I want to add authorization in certain action method in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.