added http file upload code, havin problems with file read permissions