Added support for synchronous uploading of files.