PrimeFaces fileUpload not working with dropZone

Viewed 122

I'm unable to upload a file that is dragged onto an inputTextarea component registered as a dropZone. Here's my code, based on the PrimeFaces demo example - am I missing something? The file uploads when it is dragged onto the fileUpload component itself.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:p="http://primefaces.org/ui">

<h:head></h:head>

<h:body>
    <h:form enctype="multipart/form-data">
    
        <p:inputTextarea id="customDropZone" />
    
        <p:fileUpload
            dropZone="customDropZone"
            widgetVar="docUploader"
            listener="#{test.uploadDocument}"
            sizeLimit="100000"
            allowTypes="/(\.|\/)txt$/"
        />
    
    </h:form>
</h:body>
</html>

The setup is Glassfish 6.2 / Primefaces 10 / Mojarra 3.0.1.

1 Answers
Related