mirror of
https://github.com/codex-storage/codex-frontend.git
synced 2025-02-28 02:00:44 +00:00
Fixes for working with local nodes
Got debug info, upload, and download working again for local nodes. Did not know adding more settings broke them.
This commit is contained in:
parent
7e58d4acf4
commit
eb9865ca2b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1 @@
|
||||
nim-codex/
|
||||
nim-codex-updated/
|
@ -2,7 +2,7 @@
|
||||
FROM node:18 as build-step
|
||||
WORKDIR /frontend
|
||||
ENV PATH /frontend/node_modules/.bin:$PATH
|
||||
COPY frontend/package.json frontend/yarn.lock frontend/tsconfig.json frontend/webpack.config.js ./
|
||||
COPY frontend/package.json frontend/yarn.lock frontend/tsconfig.json ./
|
||||
COPY frontend/src ./src
|
||||
COPY frontend/public ./public
|
||||
RUN yarn install
|
||||
|
@ -10,14 +10,14 @@ A frontend for codex made with Flutter.
|
||||
- Download with correct file name and extension
|
||||
- Persist the state (save recent upload list)
|
||||
- Upload multiple files at once
|
||||
- Settings for the connection
|
||||
- Dockerize frontend
|
||||
- Show status of locally running codex node
|
||||
|
||||
## Planned Features
|
||||
|
||||
- Upload to codex nodes
|
||||
- Settings for the connection
|
||||
- Dockerize frontend
|
||||
- Add support for marketplace endpoints
|
||||
- Show status of locally running codex node
|
||||
- Show status of connection to codex peers
|
||||
|
||||
## How To Run It
|
||||
|
@ -19,13 +19,17 @@ def upload():
|
||||
base_url = request.headers.get('Base-Url')
|
||||
auth_string = request.headers.get('Auth-String')
|
||||
# print(request.data)
|
||||
if auth_string is not None:
|
||||
auth = tuple(auth_string.split(':'))
|
||||
else:
|
||||
auth = None
|
||||
response = requests.post(
|
||||
f'{base_url}/api/codex/v1/upload',
|
||||
data=bytes,
|
||||
headers={
|
||||
'Content-Type': 'application/octet-stream'
|
||||
},
|
||||
auth=(auth_string.split(':')[0], auth_string.split(':')[1])
|
||||
auth=auth
|
||||
)
|
||||
print(response.status_code)
|
||||
print(response.text)
|
||||
|
@ -23,10 +23,12 @@ function DebugPage() {
|
||||
nodeInfo.nodeToConnectTo || nodeInfo.baseUrl
|
||||
}/api/codex/v1/debug/info`,
|
||||
{
|
||||
headers: {
|
||||
Authorization:
|
||||
(nodeInfo.auth && "Basic " + btoa(nodeInfo.auth)) || "",
|
||||
},
|
||||
headers:
|
||||
(nodeInfo.auth && {
|
||||
Authorization:
|
||||
(nodeInfo.auth && "Basic " + btoa(nodeInfo.auth)) || "",
|
||||
}) ||
|
||||
{},
|
||||
}
|
||||
)
|
||||
.then((response) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user