adding image uploading code in catlog.js