Some documents uploaded through the chatbot of Form+Chat load incorrectly

Hi! One of my users reported this bug to me, and I was able to replicate it:


Context:

Form+Chat document uploads work fine when submitting documents through the form (see images 1 and 2)

Image 1: Uploading file through form interface :check_box_with_check:

Image 2: Testing to see if file was correctly read :check_box_with_check:

The document is read in full, and all contents are extracted.


The Bug

However, uploading the form and then trying to upload the same file causes it to bug, not being able to read the document correctly (see image 3). It seems to be able to read the first few lines but not much else.

Image 3: Form submitted without the document as inputDocument uploaded during chat phaseBug :cross_mark:

The same document was used in all three images. I’ll leave the file here in case it helps debugging: link to file.