Fix API responses when dealing with txt files Closes #31790 See merge request !13474
Attach a file by drag & drop or click to upload