Fixes to make upload decorator work with new sf