Smag0
1
inrupt.com does not accept application/ld+json as mimetype, only application/json
shouldn’t Entreprise inrupt server accept application/ld+json ?
try{
const savedFile = await overwriteFile(
n['ve:url'],
new Blob([JSON.stringify(n, undefined, 2)], { type: "application/json" }),
{ contentType: "application/json", fetch: sc.fetch }
// new Blob([JSON.stringify(n, undefined, 2)], { type: "application/ld+json" }),
// { contentType: "application/ld+json", fetch: sc.fetch }
);
console.log(`File saved at ${getSourceUrl(savedFile)}`);
//n.url = await getSourceUrl(savedFile)
// store.dispatch('nodes/saveNode', n)
return n
}catch(e){
console.log(e)
}
the app verse
the code verse/solid-data.js at e2e7f4c895d62222d33eee6d05e6033c2c96e36c · scenaristeur/verse · GitHub
The correct MIME type for JSON-LD is application/ld+json
, not application/json+ld
, maybe it will work this way ?
Smag0
3
sorry miss-copying, i have fixed my post thxs @srosset81
this is what i have in my code
// new Blob([JSON.stringify(n, undefined, 2)], { type: "application/ld+json" }),
// { contentType: "application/ld+json", fetch: sc.fetch }