-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
9.3.0: selectFile: missing mimeType #19751
Comments
I hope, that the binary will be fixed and also it will be possible to manually set the |
You're absolutely right, and this is an oversight on our part; I could give a long explanation of how it happened, but short version is 'whoops'. Starting work on this today, prioritized this for the next minor release. |
:D we all 'whoops' from time to time :) Looking forward to the fix |
Hey, just to be sure - I have a problem when my input has accept="image/png" - the command passes but nothing is uploaded. When I have accept=".png" in my input, everything is ok. |
Yes, you either have |
The code for this is done in cypress-io/cypress#19794, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
Switching from cypress-file-upload currently not possible. We're using
attachFile
to put a PNG file (test.png
) in a hiddeninput[type="file"]
. The application uses:The output when actually filling the file input (triggered using
fileInput.click()
) with a PNG file isXX: image/png
. Using cypress-file-upload we specified this mimeType also in the test:This also yielded the same console output (
XX: image/png
).Now, reworking to
selectFile
, the code no longer supports mime type, and we need to explicitly force on invisible input:After this, the output is now only
XX:
- no mime type is present. According to the documentation manual setting of mime type should not be necessary due to improved binary handling (or so tails tell) xDDesired behavior
Cypress should detect the mime type and encoding of files used from fixtures directory in
selectFile
as documentedTest code to reproduce
Unfortunately cypress-test-tiny does not provide a way to host a simple HTML page to test, and I cannot find any good example online of such an input field where the mime type of the file is shown somewhere ...
Cypress Version
9.3.0
Other
No response
The text was updated successfully, but these errors were encountered: