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:
|
ports:
|
||||||
- "3000:80"
|
- "3000:80"
|
||||||
environment:
|
environment:
|
||||||
- codex_url=http://host.docker.internal:8080
|
- codex_url=http://kubernetes.docker.internal:31942
|
||||||
volumes:
|
volumes:
|
||||||
- ./deployment/nginx.template:/etc/nginx/templates/10-variables.conf.template:ro
|
- ./deployment/nginx.template:/etc/nginx/templates/10-variables.conf.template:ro
|
@ -12,7 +12,7 @@ function DownloadTab() {
|
|||||||
console.log(filename);
|
console.log(filename);
|
||||||
console.log(cid);
|
console.log(cid);
|
||||||
fetch(
|
fetch(
|
||||||
`/api/codex/v1/content/${cid}`,
|
`/api/codex/v1/data/${cid}`,
|
||||||
{
|
{
|
||||||
headers:
|
headers:
|
||||||
(nodeInfo.auth !== null && {
|
(nodeInfo.auth !== null && {
|
||||||
|
@ -44,7 +44,7 @@ function UploadTab() {
|
|||||||
var newCid = "";
|
var newCid = "";
|
||||||
try {
|
try {
|
||||||
await axios
|
await axios
|
||||||
.post(`/api/codex/v1/content`, bytes, {
|
.post(`/api/codex/v1/data`, bytes, {
|
||||||
headers: (nodeInfo.auth !== null && {
|
headers: (nodeInfo.auth !== null && {
|
||||||
"Base-Url": nodeInfo.nodeToConnectTo || nodeInfo.baseUrl,
|
"Base-Url": nodeInfo.nodeToConnectTo || nodeInfo.baseUrl,
|
||||||
"Content-Type": "application/octet-stream",
|
"Content-Type": "application/octet-stream",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user