Added ability to upload buffer