cypress-file-upload
cypress-file-upload copied to clipboard
can't upload video file - encoding fail
I cannot upload a video file with the current version (3.4.0)
The code:
cy.get('input.uppy-Dashboard-input').upload(
{ fileContent, fileName: 'sample_video.mp4', mimeType: 'video/mp4' },
{ subjectType: 'input' }
);
});
Also tried with 'binary' for encoding, same error.
cypress: 3.6.0 cypress-file-upload: 3.4.0 MacOS 10.14.6 Chrome v.78
Hi @adventmedia Thanks for submitting the issue!
Can you please share the code snippet you used with binary
encoding? It should work properly as we had similar issue with videos a while ago.
I have the same issue I'm using latest version of Cypress, also want to double check what should be the value of fileContent?
@RadwaSaleh it should be a resulting value from cy.fixture
FWIW I thought had this issue, but I did not. I just did this to get it working. Trying to read the file directly with cy.fixture
failed.
cy.get('input[type="file"]').attachFile({
filePath: 'test-video.mp4',
encoding: 'binary',
mimeType: 'video/mp4'
})