cy.request with video in body is well sent, but video damaged #22412
Unanswered
nudasilva
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello !
I need to test API, with a MKV file in the request.
I use the following code for that:
The request is well sent with this file.
However, the video is damaged as output.
Here are file content for comparison, before and after the request:
Original content:
Output content:
We can see that a part was modified, like 'A3' at the beginning, replaced by 'EF BF BD'
Note that this service works fine, ouside Cypress, and we are able to retrieve output video.
And, I have the same issue, with arrayBufferToBlob, for converting arrayBuffer to Blob object.
Perhaps, it is related to wrong default header parameters, here.
Note that I've used the followong ones, with the same result:
headers: {
'Content-Type': "video/x-matroska",
"Content-Length": file.length
}
Could you help me, please?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions