Closed iscorporacion closed 4 years ago
Are you behind NGINX? If so, try setting client_max_body_size in nginx.conf. It's probably that issue.
No lo he subido a un servidor lo pruebo en local, y el tiempo de la petición se agota, tengo ganas de montar un servidor local de nginx haber que pasa, pero no creo que sea client_max_body_size, si hay una forma de configurar esto desde node en node, sin crear un servidor agradecería me indicaras
I have not uploaded it to a server I try it locally, and the request time is running out, I want to mount a local nginx server if it happens, but I don't think it is client_max_body_size, if there is a way to configure this from node in node, without creating a server I would appreciate you indicate
Bueno para todos, los que estan teniendo el problema
Are you behind NGINX? If so, try setting client_max_body_size in nginx.conf. It's probably that issue.
For those who are getting this error, after a long time I can say that apparently as commented in another comment it has to do with the server, for the library to work you have to configure some sections of the server, but as we usually do tests locally node does not have these settings, for it to work you must put your app behind a web server, I used NGINX, configuring several things, in the global
configuration client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 15;
send_timeout 10;
types_hash_max_size 2048;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 250m;
large_client_header_buffers 2 1k;
and on the site
proxy_read_timeout sites 15m;
proxy_connect_timeout 15m;
with this it no longer generates that error, I hope it can serve whoever has these problems, it is not a problem with the library but the server,
I am having problems with this library and you cannot imagine how much information with the same error can be found on the Internet, you will see.
I am building an app to upload files from 150mb to S3 but multer-s3 only allows uploading very small files, in fact doing tests I realize that it really does upload after a while, but the connection with the client is closed after 2 minutes, I have tried everything and I think that on loading the file something closes the connection giving as error net :: ERR_EMPTY_RESPONSE, try to modify req.setTimeout and res.setTimeout without success and as I mention after a while I go to the S3 console And the charge file, some could tell me what may be happening, vis several related cases but none of them talks about how it was solved. this is my code, thank you all very much
----- CLIENT -----
----- SERVER-----
----- ROUTER -----
I have seen a lot of information on the Internet and all the questions, I think that multer-s3 needs a different approach than how they teach how to use it, they limit themselves to teaching only the use and not to the integration with the server either native node or express, I think that There should be a complete example of usage and it really works. I am sure many would pay for this support.