implemented delete functionality and fixed duplicate file upload issues