bug fix for utils.uploadstream
more bug fixes to upload mechanism, reverted to using Files instead of streams.