0

Is there any way to upload a file into Fuseki server from other HTML than Fuseki panel control? I think that it could be done with javascript through an AJAX POST but I am not sure about what exactly should be send to Fuseki. I have checked in the console that once a file is uploaded from Fuseki panel control POST is done. This is the output:

    10:55:50 INFO  [1] POST http://localhost:3030/ds/upload
    10:55:50 INFO  [1] Upload: Filename: test.owl, Content-Type=application/octet-stream, Charset=null => RDF/XML
    10:55:50 INFO  [1] Upload: Graph: default (37 triple(s))
    10:55:50 INFO  [1] 200 OK (125 ms)

In addition, I am checking the network data with browser to check what should be included in the ajax POST. In fact, I have succeeded sending select queries through AJAX GET and update queries through ajax POST. However, any luck with the described issue.

BRF
  • 13
  • 4

1 Answers1

1

There are at least a couple of ways:

  1. Use the SPARQL HTTP Graph Store protocol. For example, the s-put script in the Fuseki distribution does this. You need to enable the Graph Store protocol support.
  2. Issue a SPARQL LOAD command. You need to enable the SPARQL Update endpoint.

See the Fuseki documentation for details.

  • I understand what you mean but how to do it within an HTTP POST request (ajax)? In other words, how would the ajax post structure be? As I said, I have done post for executing SPARQL update queries but I am not able to find the right way to upload a file. I know that Fuseki offers the control panel, in which queries can be executed and files can be uploaded. However, I was wondering if files can be uploaded from other html tab doing the described http post request (let's say that someone is interested in doing another panel control). – BRF Aug 27 '14 at 17:36