bin icon indicating copy to clipboard operation
bin copied to clipboard

Cant upload files larger than 100MB

Open minionflo opened this issue 1 year ago • 7 comments

minionflo avatar Jul 02 '24 11:07 minionflo

Im using Docker. My env vars are:

- BIN_LIMITS={form="100000 MiB"}
- BIN_CLIENT_DESC=Test
- BIN_BINARY_UPLOAD_LIMIT=100000

minionflo avatar Jul 02 '24 12:07 minionflo

Cloudflare DNS?

Image

JamsRepos avatar Jan 29 '25 10:01 JamsRepos

No, same problem even with localhost

minionflo avatar Jan 29 '25 10:01 minionflo

I would check your nginx block/apache configs. I had to edit my nginx block to include the below for a 128MB limit:

client_max_body_size 128M;

EdTheLoon avatar Feb 01 '25 18:02 EdTheLoon

im not using a reverse proxy, the error still happens if i run it localy on my computer and connect to it via 127.0.0.1

minionflo avatar Feb 01 '25 18:02 minionflo

Can confirm the issue. Uploading file trough my HAPRoxy > Nextcloud without any problem. Uploading them the docker-compose.yml'version of this project, however is stuck to 100MB. max.

Write avatar Mar 05 '25 23:03 Write

To solve it :

At this line https://github.com/wantguns/bin/blob/master/src/main.rs#L68

Replace

#[clap(short, long, default_value_t = 100)]

With

#[clap(short, long, default_value_t = 100, env)]

Which actually allows binary_upload_limit to be set via your env VARS.

You can then add this env your docker-compose env vars :

      - BINARY_UPLOAD_LIMIT=1000

In your docker-compose to set the limit at 1GiB just fine.


You can git clone this project to "./bin", change the source code, and change your docker-compose.yml as such :

services:
  pastebin:
    image: my_bin:latest
    build: ./bin/
[...]

docker comose up -d, will build and up the project fine.

Write avatar Mar 06 '25 00:03 Write