Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #102859
    Matias Galante
    Participant

    Hello,

    I am using Angular and I noticed in the docs there is a validateFile property you can use to ensure the right type of file is submitted and show a message otherwise if not. When you drop a file in the drop box however, you can bypass the validateFile property since it’s only called when selecting a file. When using the drop box, how can I validate the file to make sure only valid ones, say only csv and xml files are dropped?

    Thanks

    #102860
    martin-jq
    Participant

    Hello Matias Galante,

    Thank you for the feedback! In the next version the validateFile callback will be called when a file is dropped inside the drop zone.

    Meanwhile, you can use a workaround to bind to the drop event of the drop zone and call the validateFile method yourself.

    Here is an Example.

     

    Best Regards,
    Martin
    Smart HTMLElements Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.