PAHMA-979: two versions of blob upload script; code cleanup