Closed rambocoder closed 10 years ago
Good point. Should at least be configurable in leofs.
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
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