-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File upload capabilities #3
Conversation
CluEleSsUK
commented
Jul 31, 2024
- View all panel for viewing all ciphertexts
- Database migration to enable storage of boths files and text
- stuck some ciphertexts in textareas for nicer viewing/copying
- limited the size of textareas to not make the forms huge
- View all panel for viewing all ciphertexts - Database migration to enable storage of boths files and text - stuck some ciphertexts in textareas for nicer viewing/copying - limited the size of textareas to not make the forms huge
5b1ffeb
to
70c1bfb
Compare
ports: | ||
- 5432:5432 | ||
- "5432:5432" | ||
environment: | ||
PORT: 5432 | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are to use an insecure password, could you pretty please not expose the port to the outside world xD
I think you want to use the expose
keyword instead of the ports
one.
ports
is binding your host machine's port to that container's port, whereas expose
exposes a port of a container to other containers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this docker compose is only for local usage - there's a separate db in heroku configured using env vars
? Buffer.from(entry.plaintext, "base64").toString("utf-8") | ||
: <Button onClick={download}>Download File</Button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not allow to download still encrypted files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well you just copy the armor. I guess that could be downloadable too, but I stuck it in a textarea to make it easily copypastable
if (files.length !== 1) { | ||
setError("you must upload a single file") | ||
return | ||
} | ||
// let's automatically add a "file" tag as well | ||
setTags([...tags.filter(t => t === "file"), "file"]) | ||
setFile(files[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about setting a file size limit too? Maybe a few MBs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is set on the server - 20mb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see src/server/index.ts