Added entity uploading logic for task attachments
Use mime type when constructing file body for entity
Fixed a compiler error in unit test
Fixed file uploading logic