Format the response like jquery file uploader likes it

This is to be merged to fix jquery file uploader issues. It has a companion in GLClient.