Added upload in background and upload in foreground style methods