Tygs / 0bin

Client side encrypted pastebin
https://0bin.net
Do What The F*ck You Want To Public License
1.37k stars 198 forks source link

Increasing the size limits on pastes? #56

Closed gwenhastings closed 10 years ago

gwenhastings commented 10 years ago

Subject says it all.. I have installed 0bin have it running and now am attempting to increase the size of the uploads to ??? (I have 512mb set on my php based zerobin server with the file addition and am testing all kinds of file sizes on that. 0Bin is a bit more attractive right now because of the better features(for now) :)

So how to increase file upload limits?

 interested 0bin operator wants to know
manvari commented 10 years ago

In zerobin/default_settings.py, increase MAX_SIZE.

The default is MAX_SIZE = 1024 * 500 - so the default maximum paste size is 500KB. Change 500 to 1000 for 1MB, 2000 for 2MB, and so on.

Then recompile 0bin.

gwenhastings commented 10 years ago

Yes I tried that already...MAX_SIZE = 1024 * 16000 on a 1.4mb file getting message Warning! The encrypted file was 4904KB. You have reached the maximum size limit of 500KB.

manvari commented 10 years ago

I was getting that error because I hadn't recompiled 0bin. Are you sure you recompiled it after having changed MAX_SIZE?

gwenhastings commented 10 years ago

I rm ed the 0bin directory, then I redid a git clone changed the setting MAX_SIZE in zerobin/default_settings.py and compiled the code.. still the same result did a shift reload plus restarted the browser to no avail..just tried again.. same result..

  sigh system is amd64 openbsd5.1 using ports for python
sametmax commented 10 years ago

Could be a bug.

The size is checked on the client side as well. If you view the HTML source code, do you get the proper value in the <head> ? Something like :

 <script type="text/javascript">
zerobin.max_size = your_value};
</script>
gwenhastings commented 10 years ago

On 12/21/13 3:03 AM, sametmax wrote:

browswer was shift reloaded on this page both firefox and chrome under OSX were attempted. Same results for both.. from the javascript source in the browser:

from zerobin/default_settings.py:

MAX_SIZE = 1024 * 16000

and a grep -R MAX_SIZE *

shows it being set in zerobin/views/base.tpl:

zerobin.max_size = {{ settings.MAX_SIZE }};

not making sense

gwen
gwenhastings commented 10 years ago

nailed it.. I had run the pip install for zerobin and had NOT excised it from my lib/python2.7/site-packages when doing the git clone install instead.. rmed the errant zerobin and all is well.

                   thanx for the assistance
                   gwen