changed from file upload to save binary string