I have installed this package and followed the instruction how to use it, it will fill the input element with the file but when i submit my form, the file isn't there.
cy.get('#favicon').attachFile(logo)
4.2.0, macOS Mojave, Google chrome
I have tried my app manuallu filling up the form and its working fine so i dont know what i'm doing wrong on cypress with this package installed
Update, it does not work on chrome 80 but works on firefox 75 beta
I am seeing the same issue here, using Chrome 80. It runs without errors and is picking up the correct file to attach, but nothing is seen in the UI input, and the submission is still disabled.
Same issue here, the form appears as if the file was attached, but the uploaded File object is empty.
Hi, thanks for submitting the issue!
Right now I am not able to take a look into the issue properly.
In the meantime, I can suggest to check if the issue exist in v3 (previous major version):
https://github.com/abramenal/cypress-file-upload/tree/v3.5.3
Sorry about that. Not sure I can provide ETA on solving this issue in v4 since I am the only one contributor and maintainer. If you have ideas on fixing that, please feel free to open Pull Request and we can review it together.
Thanks for understanding.
@abramenal I understand. The issue does not exist in 3.5.3 (it works there).
Hi, thanks for submitting the issue!
Right now I am not able to take a look into the issue properly.
In the meantime, I can suggest to check if the issue exist in v3 (previous major version):
https://github.com/abramenal/cypress-file-upload/tree/v3.5.3
Sorry about that. Not sure I can provide ETA on solving this issue in v4 since I am the only one contributor and maintainer. If you have ideas on fixing that, please feel free to open Pull Request and we can review it together.Thanks for understanding.
@abramenal i would love to contribute to resolve this issue. The problem is that i don't know what to do next after i fork the this repo, can you give me some guidelines ?
@hallowcard13 @stevenmusumeche @cooleiwhistles can someone setup reproducible example repo so I can take a look?
I am seeing the same issue here, too銆倁sing Chrome 80. It runs without errors and is picking up the correct file to attach, but nothing is seen in the UI input, and the submission is still disabled.
Leaving this note if anyone is using newer versions. Totally understand there is only one maintainer and the outlook is bleak on fixing this. Will try the v3 version next.
Firefox 83 and Chrome 87: Runs without errors but it never changes my dropzone appearance leading me to think the file is not actually attached. (Code snippet has two different lines bc I was testing if the issue was missing options or not per the caveats in the readme.)
cy.get('[data-test="dropzone"]')
.attachFile(filePath, {
subjectType: 'drag-n-drop',
force: true
});
cy.get('[data-test="dropzone"]')
.attachFile(filePath)
cy.get('[data-test="imagePreview"]')
.should('be.visible')

I'm having same error only on firefox 84, when uploading a json file. on other extensions it works fine
I have updated the implementation for drag-n-drop, so it might be fixed in v5 I'm gonna release soon.
The issue with empty file contents after it was uploaded should be treated as other issue, as first we need to resolve problems with attaching it in frontend