leo-project / leo_gateway

🚫 DEPRECATED: leo_gateway was merged into leo-project/leofs
https://github.com/leo-project/leofs/tree/master/apps/leo_gateway
Apache License 2.0
13 stars 11 forks source link

Default cowboy_req:body/1 is 8MB in size #7

Closed rambocoder closed 10 years ago

rambocoder commented 11 years ago

I believe right now your max body size for PUT is only 8MB here https://github.com/leo-project/leo_gateway/blob/develop/src/leo_gateway_http_commons.erl#L322 because in Cowboy it was added as a security precaution, maybe you should use cowboy_req:body(infinity, Req) or cowboy_req:body(SomeLargeNumber, Req) as per Cowboy source https://github.com/extend/cowboy/blob/master/src/cowboy_req.erl#L728

essen commented 11 years ago

Good point. Should at least be configurable in leofs.

yosukehara commented 10 years ago

In latest LeoFS is able to be configurable receive length as the follows:

## Gateway's configuration:

## Total number of chunked objects
large_object.max_chunked_objs = 1000

## Maximum length of an object
large_object.max_len_of_obj = 524288000

## Length of a chunked object
large_object.chunked_obj_len = 5242880

## Threshold of length of a chunked object
large_object.threshold_of_chunk_len = 5767168

## Reading length of a chuncked object [v0.16.8-]
##   * If happening timeout when copying a large object,
##     you will solve to set this value as less than 5MB.
##   * default: "large_object.chunked_obj_len" (5242880 - 5MB)
large_object.reading_chunked_obj_len = 5242880