more media upload fixes