Skip to content

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

@dartblack

Description

@dartblack

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);
} );

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions