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

Configurable size for file uploading #1172

Open
okolya opened this issue Dec 3, 2021 · 5 comments
Open

Configurable size for file uploading #1172

okolya opened this issue Dec 3, 2021 · 5 comments

Comments

@okolya
Copy link

okolya commented Dec 3, 2021

const maxSize = 1024 * 500;

It would be nice to use env variable such as MAX_FILE_UPLOAD to configure maximum file size.

@sylvain-reynaud
Copy link

Additional information :
File limit is hard-coded in frontend and backend

pflag.Int("max-length", 10000, "max length of encrypted secret")

Memcached max limit is 1 Mo, Redis has a 512 Mo limit.

@cupcakearmy
Copy link

The limit is also in the crypto, async crypto simply cannot encrypt big messages/files. For that you need a hybrid approach.

@dweipert-3138720606
Copy link

Actually you can adjust the memcached limit like this:

memcached -I 10m  # Allow objects up to 10MB

If you change the maxSize constant and run the yopass server with a bigger max-length then uploading bigger files is possible.

I don't know the exact limit for the crypto stuff though.

But having a configurable maxSize for file sizes would be absolutely possible, because I tried it in this PR: #1154

That needs a rework though with validating the size on the server and returning an error to the client.
If you feel like doing that @okolya then please go ahead! :)

@cupcakearmy
Copy link

@okolya If you want something that works rn you can check out a similar project I made, can configure the size there.
https://github.com/cupcakearmy/cryptgeon

@Sudavar
Copy link

Sudavar commented Jan 18, 2024

@jhaals are there any plans to support larger file uploads in the near future?

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

No branches or pull requests

5 participants