migrating upload functionality