Updating image with `foaf:picture` in context - lost after truncated to Compact IRI syntax
See components/solid-directory!81 (comment 51882) for background
The image isn't updated because PyLD (in JSONLDParser
) replaces picture
in the POST body with foaf:depiction
, truncating the request like so
{'@context': 'https://cdn.happy-dev.fr/owl/hdcontext.jsonld',
'@id': 'http://localhost:8000/accounts/test/',
'slug': 'test',
'foaf:depiction': 'https://github.com/calummackervoy/calummackervoy.github.io/blob/master/assets/img/profile.jpg'}
Notice the foaf:depiction
key in the compacted data. In JSON-LD syntax this is the Compact IRI, where picture
is the default serialization when all fields are in the same vocabulary
All of our fields in the context are not in the same vocabulary, though, so I'm not sure why name
is serialized in the default syntax even though the context passes it as 'name': 'rdfs:label'
, it seems inconsistent
Anyway the outcome is that the serializer receives foaf:depiction
and has no idea that you're talking about picture
, because fields aren't linked to URI properties in DjangoLDP. The field is ignored and the picture isn't updated