Fix duplicating files after drag-n-drop upload