search cancel

"message": "Required MultipartFile parameter 'file' is not present"

book

Article ID: 228025

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

We are getting below error when upload file is done through Gateway :

"message""Required MultipartFile parameter 'file' is not present"
 
1) Working scenario - Target endpoint invoked directly from postman with below headers,
 
Content-Type - multipart/form-data
Accept - application/json
file - ABC.zip(Contains .csv and metadata.properties.xml)
 
2) Not Working through Gateway - Target endpoint invoked  from postman through Gateway with below headers,
 
Content-Type - multipart/form-data
Accept - application/json
file - ABC.zip(Contains .csv and metadata.properties.xml)
 
The possible errors we are seeing,
 
"message""Required MultipartFile parameter 'file' is not present"
"message""This batch does not have any content files"
(in this case filename while reaching target the file name name is  received as timestamp.zip where target is not considering the files as per the logs in target server)
 
 
 
 
 
 
 
 
 
 
 

 

 

Environment

Release : 10.x

Component : API GATEWAY

Resolution

It was a Postman config issue , under Headers where Content-type was not set correctly . Added again in hidden headers as "multipart/form-data".

Headers : Content-Type - multipart/form-data
Accept - application/json
Body : checked "Form Data" and added Key=File Value= ABC.zip (Which Contains .csv and file.xml)

Additional Information

validate or change content type assertion