This is just part of what is written in Upwork'sToS.
Upon Freelancer’s receipt of full payment from Client, the Work Product, including without limitation all Intellectual Property Rights in the Work Product, will be the sole and exclusive property of Client, and Client will be deemed to be the author thereof. If Freelancer has any Intellectual Property Rights to the Work Product that are not owned by Client upon Freelancer’s receipt of payment from Client, Freelancer hereby automatically irrevocably assigns to Client all right, title and interest worldwide in and to such Intellectual Property Rights. Except as set forth above, Freelancer retains no rights to use, and will not challenge the validity of Client’s ownership in, such Intellectual Property Rights. Freelancer hereby waives any moral rights, rights of paternity, integrity, disclosure and withdrawal or inalienable rights under applicable law in and to the Work Product."
However, if your client does not pay you and uses your work then you do not lose the copyright, and you can make the client take it down if it is on the Internet.
One additional wrinkle:
Though the same principles apply, things can be a little more relaxed in practice when it comes to portfolio credit:
@Douglas Michael M wrote:
When you add any work you have done here to your portfolio with an Upwork link, Upwork automatically requests permission from the buyer. As I understand it, no reply is taken as consent, (Perhsps @Upwork can confirm or correct.) Of course, it would be a courtesy to ask the client directly; the automatic mechanism may be useful if you have an unresponsive (ex-) client.
Absolutely correct, Michael. We send a request to the client about a portfolio item being linked to a contract and if they don’t reject it during 3 days, the item will be publicly linked to the freelancer's work history.