mg_upload: trigger callback when file is already closed