database.yml and upload type recognition