upload submission logic