added RecordExists method to IRepository, added image upload API and secure download handler