modoboa / modoboa-webmail

The webmail of Modoboa
MIT License
73 stars 48 forks source link

Cannot upload attachment (File too Big) #170

Open makakken opened 6 years ago

makakken commented 6 years ago

After Increasing file upload size in modoboa-parameters to 5000000bytes (aka 5mb) i cannot upload any file. i always get: "File too Big (5000000)" error. This also happens if i try to upload a file which has a size of 381 bytes.

What am i doing wrong?

kryskool commented 6 years ago

Hi @makakken

can you send us a full traceback ?

regards,

makakken commented 6 years ago

@kryskool where do i get this from? any log file? turn on debug mode? anything?

makakken commented 6 years ago

hey @kryskool , i've searched a lot, but didn't find any useful log-files. But i found a Workaround:

"Maximum attachment size in bytes (or KB, MB, GB if specified)" The Parameters help for Webmail told me to set in bytes, thatswhy i choose 5000000. if i put 5MB into the input instead, it works.

makakken commented 6 years ago

seems this line is giving wrong return value: https://github.com/modoboa/modoboa/blob/9f2ea29a9fe0cf78db2cf340e286601dc799756a/modoboa/lib/web_utils.py#L117

makakken commented 6 years ago

@kryskool i've proposed a fix.

makakken commented 6 years ago

narf... bad fix... only works with values ending on zero...