fix upload / delete media in library