Backlinks
Learn how to upload files to LinkedDataHub
Upload a file¶
Any document you can write to takes files dropped from your desktop. What a drop does is decided per file:
- RDF
- A file in one of the triple syntaxes —
.ttl,.nt,.rdf,.owlor.jsonld— is imported as data: its triples are added to the document's graph - File
- Anything else is uploaded to the document: the bytes are stored content-addressed under
uploads/and the document describes them as a file, titled after the filename
- Open the document that should hold the file
- Drag the file over the page. An overlay appears, naming both outcomes: RDF imported as data, File uploaded to this document
- Drop it. The document reloads in Read mode with the file among its resources; an image is shown inline
A file larger than the instance's upload limit is refused before it reaches the platform, and the page says so without navigating away.
Alternatively, upload through a form:
- Click the Create dropdown at the bottom of the page
- Click on File in the dropdown list that appears
- Fill out the mandatory File fields in the form:
- Filename
- Select file from your filesystem
- Title
- Enter file title
- Click Save
A file is uploaded to the document that will hold it, so create that document first. Uploading Nancy Davolio's portrait from the Northwind demo:
doc=$(ldh create item \
--title "Nancy Davolio" \
--container "${LDH_BASE}employees/")
ldh add file \
--title "Nancy Davolio" \
--file employees/nancy.jpg \
--content-type "image/jpeg" \
"$doc"The command prints the content-addressed URI of the upload as its only output:
https://localhost:4443/uploads/35fd362792e8c4bc3560a6de02f25ee551d68d02
That URI is stable across instances — it is derived from the file content alone —
which is what lets the
Northwind CSVs reference their images by hash before they are even uploaded.
--content-type is optional — the media type is detected from the file when it is not given.
If you upload an ontology file (RDF/OWL), be aware that it will not be automatically
loaded via owl:imports declarations.
This is deliberate: resolving imports at upload time would risk circular dependencies
during system initialization.
For more information on working with ontologies, see the ontologies reference documentation.