I'm trying to upload an .xlsx file using Karate and after dozens of hours spent on that.. I give up.
Given url 'http://example.com'
* multipart file file = { read: 'this:testFile.xlsx', filename: 'testFile.xlsx', contentType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }
* header Content-Type = 'multipart/form-data'
When method post
Then status 200
Here is a piece of code I'm using. This is one of hundreds versions of it, but I'm putting just this one, because every time the result is the same. Uploaded file has 0 B size...
I have read and applied suggestions from all over the internet (of course including examples from Karate docs) and each and every time I have exaclty the same result - 0 byte file on the server.
In a few of threads here, I saw comments that for 'thousands' of Karate users it works, so I'm kindly asking one of you to share some real-world working example of successfull .xlsx file upload.
PS. I'm uploading exactly the same file using JMeter and Postman, and it works fine.