improve upload rule