Added upload handling