Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] failed upload #317

Open
FahirL opened this issue Jul 25, 2021 · 1 comment
Open

[Bug] failed upload #317

FahirL opened this issue Jul 25, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@FahirL
Copy link

FahirL commented Jul 25, 2021

Hey, I have a problem with the upload. One file is successfully uploaded, but one is not. The file that was successfully uploaded is .x_t, and .stl cannot. I've tried different ways with different codes, but it won't.
Screenshot_1
Screenshot_2
Screenshot_3
Screenshot_4

The upload starts, but after a few seconds it simply disappears and a fail appears. I also can screen video, if screens are not enough.
cy.fixture(fileName, "UTF-8").then(fileContent => { cy.get('.ant-upload.ant-upload-drag') .attachFile({ fileContent, fileName, mimeType: 'application/sla'},{ subjectType: 'drag-n-drop' }, { timeout: 150000 })

A successfully uploaded file has 50kb, and the one that will not has 1.5mb. What is wrong?

btw. When I upload a file without automation, it works.

"cypress": "^8.0.0",
"cypress-file-upload": "^5.0.8",
@FahirL FahirL added the bug Something isn't working label Jul 25, 2021
@juanan22
Copy link

I had a similar problem but not the same, maybe this works:
Try "cy.get('input[type="file"]').attachFile(nameoffilegoeshere.stl).trigger('input');"
Adding the trigger('input')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants