diff --git a/rocrate/model/file.py b/rocrate/model/file.py
index 9251aeb..a5d1c43 100644
--- a/rocrate/model/file.py
+++ b/rocrate/model/file.py
@@ -59,6 +59,7 @@ class File(FileOrDir):
                     if self.fetch_remote:
                         out_file_path.parent.mkdir(parents=True, exist_ok=True)
                         urllib.request.urlretrieve(response.url, out_file_path)
+                        self._jsonld['contentUrl'] = str(self.source)
         elif self.source is None:
             # Allows to record a File entity whose @id does not exist, see #73
             warnings.warn(f"No source for {self.id}")

diff --git a/test/test_write.py b/test/test_write.py
index 10f0ec3..6fb57b6 100644
--- a/test/test_write.py
+++ b/test/test_write.py
@@ -150,6 +150,7 @@ def test_remote_uri(tmpdir, helpers, fetch_remote, validate_url, to_zip):
     if fetch_remote:
         out_file = out_crate.dereference(file_.id)
         assert (out_path / relpath).is_file()
+        assert out_file["contentUrl"] == url
     else:
         out_file = out_crate.dereference(url)
         assert not (out_path / relpath).exists()

Add contentUrl property to files when it's known
E.g., when a remote file is added with `fetch_remote=True`. See https://github.com/ResearchObject/ro-crate/pull/189#issuecomment-1227697348.
test/test_write.py::test_remote_uri[True-False-False] test/test_write.py::test_remote_uri[True-False-True] test/test_write.py::test_remote_uri[True-True-False] test/test_write.py::test_remote_uri[True-True-True]
test/test_write.py::test_file_writing[False-False] test/test_write.py::test_file_writing[False-True] test/test_write.py::test_file_writing[True-False] test/test_write.py::test_file_writing[True-True] test/test_write.py::test_in_mem_stream[BytesIO] test/test_write.py::test_in_mem_stream[StringIO] test/test_write.py::test_remote_uri[False-False-False] test/test_write.py::test_remote_uri[False-False-True] test/test_write.py::test_remote_uri[False-True-False] test/test_write.py::test_remote_uri[False-True-True] test/test_write.py::test_file_uri test/test_write.py::test_looks_like_file_uri test/test_write.py::test_ftp_uri[False] test/test_write.py::test_remote_dir[False-False] test/test_write.py::test_remote_dir[False-True] test/test_write.py::test_remote_dir[True-False] test/test_write.py::test_remote_dir[True-True] test/test_write.py::test_remote_uri_exceptions test/test_write.py::test_missing_source[file] test/test_write.py::test_missing_source[dataset] test/test_write.py::test_stringio_no_dest[False-False] test/test_write.py::test_stringio_no_dest[False-True] test/test_write.py::test_stringio_no_dest[True-False] test/test_write.py::test_stringio_no_dest[True-True] test/test_write.py::test_no_source_no_dest[False-False] test/test_write.py::test_no_source_no_dest[False-True] test/test_write.py::test_no_source_no_dest[True-False] test/test_write.py::test_no_source_no_dest[True-True] test/test_write.py::test_dataset test/test_write.py::test_no_parts test/test_write.py::test_no_zip_in_zip test/test_write.py::test_add_tree