You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this issue. However, I don't think stardog.js should accept a filename, because I don't think it should be in the business of reading files from a user's system (it's an HTTP wrapper library), and also because it is not generally possible at present to read a file in the browser given just a filename (things are starting to change a bit there, but just barely, and not in all major browsers).
More importantly, stardog.js already can accept a stream as an argument to db.add, so you don't actually need to load whole files into memory in order to send them. For example, in Node.js, you can do something like this (this is pseudo-code-ish, but expresses the idea):
Probably the real issue here is that our API docs for db.add claim that the content argument must be a string, and that is false. We should update the docs. I'll change the name of this issue to reflect that.
jmrog
changed the title
db.add should allow filename, rather than content
db.add API docs are not correct; it can accept a stream as well as a string
Jul 7, 2021
Loading file in memory to stream afterward is not efficient nor inline with Javascript mentality.
The text was updated successfully, but these errors were encountered: