Skip to content
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

Merged
merged 1 commit into from
Aug 2, 2024
Merged

File upload capabilities #3

merged 1 commit into from
Aug 2, 2024

Conversation

CluEleSsUK
Copy link
Contributor

  • 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
@CluEleSsUK CluEleSsUK requested a review from najienka July 31, 2024 11:47
Comment on lines 18 to 23
ports:
- 5432:5432
- "5432:5432"
environment:
PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: test
Copy link
Member

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.

Copy link
Contributor Author

@CluEleSsUK CluEleSsUK Jul 31, 2024

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

src/client/components/AllList.tsx Show resolved Hide resolved
Comment on lines +73 to +74
? Buffer.from(entry.plaintext, "base64").toString("utf-8")
: <Button onClick={download}>Download File</Button>
Copy link
Member

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?

Copy link
Contributor Author

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

Comment on lines +65 to +71
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])
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@CluEleSsUK CluEleSsUK merged commit 0c311a5 into master Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants