-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix accept for file #1012
base: master
Are you sure you want to change the base?
fix accept for file #1012
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci pour le fix ! Juste deux petits commentaires.
let type = triples.find(q => ['http://www.w3.org/1999/02/22-rdf-syntax-ns#type'].includes(q.predicate.value)) | ||
.object.value; | ||
|
||
if (['http://semapps.org/ns/core#File', 'semapps:File'].includes(type) && !forceSemantic) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comme bodyToTriples retourne des quads, ce ne sera jamais semapps:File
mais toujours des URIs complets. Même chose pour mimeType et localPath.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Par ailleurs, ce serait bien de mettre la condition if (!forceSemantic)
avant l'appel à bodyToTriples, ça évite de faire ces calculs coûteux (forceSemantic est souvent true, par exemple lorsque ldp.resource.get
est appelé par ldp.container.get
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai eu le cas d'un semapps:File
c'est pour ca que j'ai pris des précautions. Je crois que c'est dans le cas d'un json-ld avec prefix/context
@@ -0,0 +1,4 @@ | |||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | |||
# yarn lockfile v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si tu peux effacer ce fichier inutile STP
fix #1011