Properly working image uploadin and deleting