Fixed image uploading in controller