yopass
yopass copied to clipboard
Configurable size for file uploading
https://github.com/jhaals/yopass/blob/7fd2b38ad79fa4ca4fb47f3b424636a69ae5edd3/website/src/createSecret/Upload.tsx#L20
It would be nice to use env variable such as MAX_FILE_UPLOAD to configure maximum file size.
Additional information : File limit is hard-coded in frontend and backend https://github.com/jhaals/yopass/blob/b43905591976caee9cd101ab39b7c002e2a21291/cmd/yopass-server/main.go#L26 Memcached max limit is 1 Mo, Redis has a 512 Mo limit.
The limit is also in the crypto, async crypto simply cannot encrypt big messages/files. For that you need a hybrid approach.
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: https://github.com/jhaals/yopass/pull/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! :)
@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
@jhaals are there any plans to support larger file uploads in the near future?