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

File input is not initialized for newly added items into collection #6637

Open
dartblack opened this issue Dec 11, 2024 · 0 comments
Open

File input is not initialized for newly added items into collection #6637

dartblack opened this issue Dec 11, 2024 · 0 comments

Comments

@dartblack
Copy link

Describe the bug
File input javascript handler initialized in assets/js/field-file-upload.js is only done on page load. When having FileUploadType in collection the initializer is not called when adding new item into the collection.

To Reproduce
Version: latest (v4.20.2)

Have a collection with FileUploadType in your form
Add new item
Select a file to upload
You should be able to see filename and its size, but instead it looks like you did not select a file.

Additional context
Need to modify field-file-upload.js

document.addEventListener('ea.collection.item-added', function(){
setTimeout(function () {
eaFileUploadHandler
}
}, 1000);
} );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants