Assistant api - failed to attach txt file and scanned pdf

Tried to attach txt file to assistant but it always failed. Any idea why? it is utf-8 so should not be a problem.


same for scanned pdf: