added a GDSocket based implementation, which bypasses the file IO when uploading docs