file-upload - 将本地文件上传到 GraphDB
问题描述
尝试使用以下 curl 命令将本地海龟文件上传到 GraphDB(免费版),运行在http://localhost:7200/
.
curl -X POST 'http://localhost:7200/repositories/testrepository1/statements' -H "Content-Type:text/turtle" -T "/home/Desktop/onto.ttl"
尽管这个 curl 命令在执行时没有返回任何错误,但是本地文件onto.ttl
并没有上传到testrepository1
我正在免费使用 9.7.0 版的 graphDB。
如果有人帮助我,将不胜感激。提前致谢!
解决方案
您使用了错误的 mime 类型 - 它应该是 application/x-turtle 而不是 text/turtle。该请求将如下所示:
curl -X POST -H "Content-Type:application/x-turtle" -T "/home/Desktop/onto.ttl" http://localhost:7200/repositories/testrepository1/statements
推荐阅读
- r - 在R中的单词列表中移动字符
- bash - 如何正确转义要传递给`docker run /bin/bash --init-file`的脚本
- python - 如何使用python从串行读取数据?
- reactjs - 如何使用 React Hooks 提取通常使用 yield 调用的功能?
- python - 在 Python 中读取列表
- proguard - 使用 Proguard 保留所有没有特定字符的方法
- java - 在 Java 中使用访问者模式进行双重调度
- algorithm - 如果一个循环执行固定次数,是否会影响时间复杂度
- installshield - 如何在 InstallScript 中散列字符串?
- cmd - 在cmd中制作循环进度条(或加载条)