调用nebula-import失败

nebula v1.2.0
nebula studio v1

python语句(PostMan导出):

import requests

url = "http://XXX:7001/api/files/upload?Content-Disposition=form-data&name=file&filename=dsafff.csv&Content-Type=application/vnd.ms-excel"

payload={}
files=[
  ('file',('candidateNode_copy.csv',open('XXX.csv','rb'),'text/csv'))
]
headers = {
  'Proxy-Connection': 'keep-alive',
  'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 Edg/92.0.902.62',
  'X-Requested-With': 'XMLHttpRequest',
  'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryd4zsjIzKh3JkCktS',
  'Accept': '*/*',
  'Origin': 'http://xxx:7001',
  'Referer': 'http://xxx:7001/import',
  'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
  'Cookie': '_ga=GA1.1.599074290.1616395720; locale=ZH_CN; Hm_lvt_b9cb5b394fd669583c13f8975ca64ff0=1627524967,1627612772,1627879099,1627959086; nsid=de94b8d118e557ff3e54875946395226; nh=9.135.95.249:13708; nu=root; np=nebula; _gid=GA1.1.1256907028.1628059656; Hm_lpvt_b9cb5b394fd669583c13f8975ca64ff0=1628059656'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

报如下warning:

[warn] 31#31: *1 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000001, client: 9.218.225.31, server: 127.0.0.1, request: "POST /api/files/upload?Content-Disposition=form-data&name=file&filename=dsafff.csv&Content-Type=application/vnd.ms-excel HTTP/1.1", host: "xx:7001", referrer: "http://9.135.95.249:7001/import"

但是找不到上传的csv
但是同样的语句用Postman就能找到上传的csv
为什么啊????

没看懂这段代码干嘛的, 哪里调用importer了? 你是想用importer导入数据?

麻烦补充下更多信息

对的对的

需要什么其他信息呢?

需要用importer导入数据为什么不直接用 GitHub - vesoft-inc/nebula-importer: Nebula Graph Importer with Go, 或者nebula graph studio自带的导入功能呢?

这些或者是服务器端操作或者是可视化界面操作嘛,就希望能做个远程操作的

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。

浙ICP备20010487号