Compare commits
No commits in common. "ffb2aabce4195913ea977eed98fe06a372177760" and "2ace1f689cd1e03ef76a61e84805b5455e0dafe9" have entirely different histories.
ffb2aabce4
...
2ace1f689c
2
index.js
2
index.js
@ -94,7 +94,7 @@ function handleFileSelect(event) {
|
||||
console.log("Selected file:", selectedFile);
|
||||
}
|
||||
|
||||
const serverUrl = "http://localhost:34537"; // Adjust the port as needed
|
||||
const serverUrl = "http://localhost:3000"; // Adjust the port as needed
|
||||
|
||||
async function handleUpload() {
|
||||
const fileInput = document.querySelector('input[type="file"]');
|
||||
|
18
readme.md
18
readme.md
@ -13,7 +13,6 @@ run the dev server:
|
||||
`vite`
|
||||
|
||||
listen for uploads (run backend server)
|
||||
THIS IS CURRENTLY HARDCODED TO RUN ON PORT 34537
|
||||
`node server`
|
||||
|
||||
go to http://localhost:5173
|
||||
@ -22,24 +21,19 @@ check out the console (right click inspect)
|
||||
TODO:
|
||||
Check for security make sure I can't get around it some easy way at least.
|
||||
new npub with proper nip05 and username access?
|
||||
|
||||
grab preferred relays from nip (notepress has an example in setup.js) instead of using an explicit one.
|
||||
|
||||
Create directory for a user it doesn't already exist. UI think upload will fail right now if the user doesn't already have a directory
|
||||
|
||||
need provisions to catch if the user is uploading a file with the same name as a file already in their storage, ask to replace or rename the new file
|
||||
|
||||
config for max file size and default storage limit for a given user
|
||||
|
||||
can make a exceptions later to allow more storage for a user based on criterea
|
||||
|
||||
create a setup that runs both frontend and backend code and make a config file
|
||||
for any configs for the user
|
||||
|
||||
set up create path if it doesn't exist for a new user.
|
||||
config for max file size and default storage limit for a given iser
|
||||
can make a exceptions later to allow more storage for a user based on criterea
|
||||
|
||||
the .well-known and .nip05Storage are for testing purposed right now. they will be removed later.
|
||||
|
||||
redo readme
|
||||
|
||||
get rid of cors errors?
|
||||
|
||||
make favicon
|
||||
|
||||
test on my site
|
||||
|
@ -26,8 +26,8 @@ const storage = multer.diskStorage({
|
||||
|
||||
const upload = multer({ storage: storage });
|
||||
|
||||
app.listen(34537, () => {
|
||||
console.log("Server is running on port 34537");
|
||||
app.listen(3000, () => {
|
||||
console.log("Server is running on port 3000");
|
||||
});
|
||||
|
||||
app.post("/upload", upload.single("file"), (req, res) => {
|
||||
|
Loading…
Reference in New Issue
Block a user