many file POST tests and a bug fix in the api