I need to switch my thread to DispatchQueue.main to get back on UI thread, but I need to do it in a post with payload. Is there an equivalent to dataTaskPublisher for uploadTask or some other mechanism to do this?
No there isn't. But unless you have a large payload which you want to upload from file or stream, there's no need to use an upload task. You can make a POST request with a data task just fine.
If you do want a publishable upload, Alamofire (which I develop) supports that use case.