mirror of
https://github.com/codex-storage/codex-frontend.git
synced 2025-03-01 02:30:49 +00:00
UPD api endpoints for upload and download
This commit is contained in:
parent
8368c46020
commit
8b3b7adad3
@ -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
|
@ -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 && {
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user