formUpload - change MIME type

formUpload is just a utility that wraps a RawFileBodyPart + asMultipartForm

so this will work, I guess

.bodyPart(RawFileBodyPart("file", data.xls").contentType("application/").fileName("data.xls"))


that should go on the documentation

Done :slight_smile:

But how to upload the file for put operation…This is not working for put…What may be the solution in gatling 2.0

Send your code that is not working.

Thanks john,Here I am giving my code…

.formParam(“title”, “Post with gatling”)
.formParam(“content”, “Content of pos”)
.formParam(“author”, “user12”))

And previously I got advice thta formParam will work for gatling 2.1…But I don’t know how to do that…presently I am using gatling 2.0…So If that is the only solution please tell me the

Step by Step procedure to migrate…Actually In my case formParam and formUpload is not at all working…Please help me with detail solution…As per my api I need only formParam…


So, what you are going to have to do is choose one of these two options:

  1. Upgrade to Gatling 2.1
  2. Figure out how to build the body of the PUT request manually

If you can’t make option 1 work, then start here for option 2:

John…I know about forms…But what is the syntax to provide form to gatling???

Look at the format that it gets sent to the server in. Any reason why you can’t give it to Gatling exactly like that?