Added proper redirect when uploading an image