Revenge porn can be costly.

A federal district court in California last week entered a default judgment against a man and ordered him to pay $6.45 million in damages after he was accused of spreading an ex-girlfriend's naked pictures and videos online.

It's believed to be the second-largest payout for a victim of revenge porn who was not a celebrity, according to the woman's lawyers.

The unnamed woman, who was listed as Jane Doe in legal filings, sued the man, David Elam II, in civil court. She alleged copyright infringement, online impersonation with intent to harm, stalking and the intentional infliction of emotional distress.

The case, which was filed in 2014, also underscores how complicated it can be to seek justice.

There's no federal law against revenge porn — just a patchwork of state laws. Criminal cases are far and few between.

California has a criminal law on the books. But though a separate criminal case was brought against Elam in 2014, federal prosecutors dropped it two years ago.

"We never relied on the outcome of the criminal action," said K&L Gates partner Seth Gold in an interview with CNNMoney. Doe's civil case was part of the firm's Cyber Civil Rights Legal Project, which provides pro bono legal assistance to nonconsensual pornography victims.

A request for comment from Elam was not immediately returned Monday.

Related: Abortion funds band together to sue their cyberattackers

Jane Doe also had to copyright her breasts to get her intimate pictures off the internet — a process that helps some revenge porn victims regain their privacy.

Doe chose that route in part because of the way Elam obtained the photos, according to her attorneys. Doe sent the photos to her ex while the two were in a relationship.

That meant they were initially obtained consensually. Some websites refuse to remove images that were taken with consent if the person does not register a copyright.

Doe's copyright registrations, however, enabled her to get her images removed from some websites.

Doe was awarded $450,000 in damages because of copyright infringement. She also received $3 million in compensatory damages for emotional distress, and $3 million in punitive damages.

"Revenge porn is a very serious violation of someone's rights and can lead to very serious injuries that are worthy of being redressed -- and in a more general sense, people can not ignore the judicial process," Gold said.

The largest amount of money awarded in a non-celebrity revenge porn case was $8.9 million, which a Seattle couple received last spring. The Cyber Civil Rights Legal Project also represented that couple.