Working xhr requests and file uploads set as should be