edit upload logic