Image upload using rest api

Hi Katalon Team,

When I upload a image file through form data and some more fields my request is submitted successfully but when I get the response from getResponseText() the image file path is not uploaded correctly. when I generate same scenario in postman I get the response correctly. So I found this issue on katalon.

Please look into this problem urgently.


1 Like

Please post screen shots of the issue.

here is the above screenshots.
image link is mentioned below after getting response from the server:\\Users\\DAT-Asset-192\\Desktop\\api-image.jpg

Above screenshot is based on object repository.First api will take mobile no and country code then security code will generate.2nd api mobile no will be verified in 3rd api image will be uploaded.

when I use it through test case same problem occurs.Here is my code for image upload only:—

String endpoint = endpoint

String requestMethod=requestMethod

TestObjectProperty header1 = new TestObjectProperty(“Content-Type”, ConditionType.EQUALS, “multipart/form-data”)
//TestObjectProperty header2 = new TestObjectProperty(“Accept”, ConditionType.EQUALS, “application/json”)
ArrayList defaultHeaders = Arrays.asList(header1)

List body = new ArrayList()

FormDataBodyParameter first_name = new FormDataBodyParameter(“first_name”,first_name,“PARAM_TYPE_TEXT”)
FormDataBodyParameter last_name = new FormDataBodyParameter(“last_name”,last_name,“PARAM_TYPE_TEXT”)
FormDataBodyParameter email = new FormDataBodyParameter(“email”,email,“PARAM_TYPE_TEXT”)
FormDataBodyParameter password = new FormDataBodyParameter(“password”,password,“PARAM_TYPE_TEXT”)
FormDataBodyParameter country_code = new FormDataBodyParameter(“country_code”,country_code,“PARAM_TYPE_TEXT”)
FormDataBodyParameter mobile_number = new FormDataBodyParameter(“mobile_number”,mobile_number,“PARAM_TYPE_TEXT”)
FormDataBodyParameter device_type = new FormDataBodyParameter(“device_type”,device_type,“PARAM_TYPE_TEXT”)
FormDataBodyParameter os_ver = new FormDataBodyParameter(“os_ver”,os_ver,“PARAM_TYPE_TEXT”)
FormDataBodyParameter device_name = new FormDataBodyParameter(“device_name”,device_name,“PARAM_TYPE_TEXT”)
FormDataBodyParameter vendor_name = new FormDataBodyParameter(“vendor_name”,vendor_name,“PARAM_TYPE_TEXT”)
FormDataBodyParameter image = new FormDataBodyParameter(“image”,image,“File”)


HttpFormDataBodyContent bodyContent = new HttpFormDataBodyContent(body)

RequestObject ro1 = new RequestObject()





ResponseObject respObj1 = WS.sendRequest(ro1)


//Verifing STATUS-CODE
code1 = respObj1.statusCode

And I have used the datadriven method for the above code.

I have also attached the postman screen here.

Any update about the above issue from katalon Team???

Any Update team.I have still not find the solution?

Hi @nazneen, Can you post the screenshot in Postman too?


Here is the postman link:

Screenshot by Lightshot.

and here is the image link:

I have noticed that using katalon image is not posted on server.Please look into this matter. Its very urgent.


Please help me on this.It creates serious issues on our development end. If this will not work then sadly We have to stop using katalon . :frowning: Please please urgent help.

Hi @nazneen,
Can you share the endpoint?


Yes. there is 3 process for registration process.
for 1st) country-code and mobile no taking

for 2nd country code mobile no and security code is taking

for 3rd step user details is taking like first name, last name, image and so on…

here is the end point for the 3 of the above.
“country_code”: “91”,
“mobile_number”: “8116703641”

“country_code”: “91”,
“mobile_number”: “8116703641”,
“security_code”: “737713”

everything is working fine except the image file.


any update plz?

Hi katalon team,

I am still waiting.Is there any way to solve out this problem ? Please help.

Hi @nazneen,
I cannot access your endpoints

Hello huynguyen,

Image upload problem is very common. I am not able to upload any type of image file through manual katalon. Also If the image is uploaded either its showing wrong path or shwoing 404 error path. i found this is very common problem while uploading image. you can check it with other api too which has image upload features.

I found this is as a bug in katalon.

Hi @nazneen,
Can you send me the HAR file logged when you execute your test case? (201.5 KB)

Hi Huynguyen,

Here is the list of har file.
I also found several related issues on forum but not found any solution related to this. please guide on the above.

Hi @nazneen,
From the HAR files, I can see that your requests have been sent successfully. Have you checked the returned url of the image to see if the image has been uploaded successfully?

No the image is not uploaded successfully. when I clicked on that image url, it shows me 404 error message.

Here is the Screenshots

and here is the image url:\\Users\\DAPL-Asset-180\\Desktop\\api-image.jpg

I think the image format is not taking correctly.

any Update Huynguyen?