I am trying to send an image/video file to my API endpoint by attaching the
file under 'Files Upload' section of the HTTP Request and always get this
error:
*"TypeError: Cannot read property 'size' of undefined" * For some reason,
the file does not get recognised on jmeter, tried on Postman and it works
fine. I have tried various things, like ticked the box "Use
multipart/form-data", moved file to JMeter's bin folder.
*Request Headers:*
*Connection: keep-alivecontent-type: multipart/form-data;
boundary=mlsContent-Length: 1055964Host: xyzUser-Agent:
Apache-HttpClient/4.5.7 (Java/12.0.1)*
*Request Body:*
*POST
https://xyz <
https://xyz>POST
data:--JypF-HPWzMbOA9YQFz8pUAXgZvilHpAA63Content-Disposition: form-data;
name="file"; filename="SampleVideo_1280x720_1mb.mp4"Content-Type:
video/mp4Content-Transfer-Encoding: binary<actual file content, not shown
here>--JypF-HPWzMbOA9YQFz8pUAXgZvilHpAA63--Cookie Data:connect.sid=xyz*
MIME Type: video/mp4 Content-Type: multipart/form-data
Please help!!