rewrite get_upload_to logic to eliminate loop and avoid reinventing os.path.splitext
rewrite get_upload_to logic to eliminate loop and avoid reinventing os.path.splitext

rsalmaso/wagtail,mikedingjan/wagtail,zerolab/wagtail,nutztherookie/wagtail,thenewguy/wagtail,nilnvoid/wagtail,nealtodd/wagtail,wagtail/wagtail,nilnvoid/wagtail,mikedingjan/wagtail,iansprice/wagtail,rsalmaso/wagtail,chrxr/wagtail,takeflight/wagtail,rsalmaso/wagtail,torchbox/wagtail,thenewguy/wagtail,timorieber/wagtail,jnns/wagtail,gasman/wagtail,wagtail/wagtail,timorieber/wagtail,kaedroho/wagtail,nilnvoid/wagtail,zerolab/wagtail,nutztherookie/wagtail,nimasmi/wagtail,jnns/wagtail,thenewguy/wagtail,iansprice/wagtail,nutztherookie/wagtail,wagtail/wagtail,torchbox/wagtail,mikedingjan/wagtail,mikedingjan/wagtail,takeflight/wagtail,kaedroho/wagtail,torchbox/wagtail,thenewguy/wagtail,takeflight/wagtail,timorieber/wagtail,zerolab/wagtail,FlipperPA/wagtail,kaedroho/wagtail,gasman/wagtail,nimasmi/wagtail,nilnvoid/wagtail,nimasmi/wagtail,nutztherookie/wagtail,thenewguy/wagtail,mixxorz/wagtail,rsalmaso/wagtail,Toshakins/wagtail,torchbox/wagtail,gasman/wagtail,jnns/wagtail,iansprice/wagtail,mixxorz/wagtail,nimasmi/wagtail,chrxr/wagtail,wagtail/wagtail,gasman/wagtail,chrxr/wagtail,FlipperPA/wagtail,zerolab/wagtail,kaedroho/wagtail,Toshakins/wagtail,mixxorz/wagtail,wagtail/wagtail,mixxorz/wagtail,iansprice/wagtail,nealtodd/wagtail,jnns/wagtail,zerolab/wagtail,Toshakins/wagtail,rsalmaso/wagtail,kaedroho/wagtail,takeflight/wagtail,chrxr/wagtail,FlipperPA/wagtail,Toshakins/wagtail,timorieber/wagtail,FlipperPA/wagtail,gasman/wagtail,nealtodd/wagtail,nealtodd/wagtail,mixxorz/wagtail