use queue and database to manage upload task