UPD api endpoints for upload and download

This commit is contained in:
Shaun Orssaud 2023-11-17 15:22:43 +09:00
parent 8368c46020
commit 8b3b7adad3
3 changed files with 3 additions and 3 deletions

View File

@ -7,6 +7,6 @@ services:
ports:
- "3000:80"
environment:
- codex_url=http://host.docker.internal:8080
- codex_url=http://kubernetes.docker.internal:31942
volumes:
- ./deployment/nginx.template:/etc/nginx/templates/10-variables.conf.template:ro

View File

@ -12,7 +12,7 @@ function DownloadTab() {
console.log(filename);
console.log(cid);
fetch(
`/api/codex/v1/content/${cid}`,
`/api/codex/v1/data/${cid}`,
{
headers:
(nodeInfo.auth !== null && {

View File

@ -44,7 +44,7 @@ function UploadTab() {
var newCid = "";
try {
await axios
.post(`/api/codex/v1/content`, bytes, {
.post(`/api/codex/v1/data`, bytes, {
headers: (nodeInfo.auth !== null && {
"Base-Url": nodeInfo.nodeToConnectTo || nodeInfo.baseUrl,
"Content-Type": "application/octet-stream",