further refactor towards single file upload with metadata