ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: upload module


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: upload module
  • From: Konstantin Svist <fry.kun@xxxxxxxxx>
  • Date: Fri, 01 Apr 2011 18:01:02 -0700
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=q9ogaGNXE9XgTz+zFdwi4DNPI2w8eNFWEtexL5jd0ek=; b=yBSEqtVTGD/AMfsetAo6DRkmLXXHg9J/IJndexyb2sZan2FZd9jxGC55FknCQoUgiN MGXhmXs3JvncZ1ArxpYCqKtevKKJB6zr9/OoYjNw4sC+t3WI5CxLnIgFuC2Q00gyk76l d4vnYGqQ89cP82TLwDIc3iGA/3XrGVXGuIu00=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=kuf/4jBbILzfLviPrpjz4WDkdW484a05K0gTo3U2nXzJRdh9PlUuoWKuDAupotBG7F gVNJXcCAgVTLi6fJlsBG2XCYb/gezajCNwlJ01Q3TVXR06JfZE7q/2i7gzkPQg43y5wL rwcKF+IhypE1FUJ05jVXeYdNQc4hM+Vm8wRjg=
  • In-reply-to: <5135783.2381.1301482484805.JavaMail.root@xxxxxxxxxxxxxx>
  • References: <5135783.2381.1301482484805.JavaMail.root@xxxxxxxxxxxxxx>

2011/04/01 17:55:37 [error] 20332#0: *13639479 open() "/usr/local/nginx/html/upload" failed (2: No such file or directory), client: 63.82.5.67, server: , request: "POST /upload HTTP/1.1", host: "testserver:3480", referrer: "http://testserver:3480/uploadform";

Файлы не сохраняются.
Если добавляю /usr/local/nginx/html/upload простой HTML - сохраняются, но браузеру идёт HTTP/405

tcpdump говорит что на upload_pass/proxy_pass ничего не посылается...

nginx/0.9.5



On 03/30/2011 03:54 AM, Valery Kholodkov wrote:
Не обязаельно. Можно просто сделать дамп запроса с помощью nc.

----- Konstantin Svist<fry.kun@xxxxxxxxx>  wrote:
Пробовал с

      location @test {
          proxy_pass   http://localhost:8080;
      }


но без сервера на 8080. Там нужна живая страница чтобы начать?


On 03/29/2011 12:40 AM, Valery Kholodkov wrote:
Попробуйте без echo.

Konstantin Svist пишет:
Что-то не могу заставить upload работать.. Все время получаю "The
connection was reset"


Конфига:

server {
   listen 80;
   location /upload {
     client_max_body_size 100m;
     access_log logs/other/upload.log;
     error_log logs/other/upload_err.log;

     upload_pass @test;
     upload_store /tmp/upload 1;
     upload_store_access user:r;
     upload_set_form_field $upload_field_name.name "$upload_file_name";
     upload_set_form_field $upload_field_name.content_type
"$upload_content_type";
     upload_set_form_field $upload_field_name.path "$upload_tmp_path";

     # Inform backend about hash and size of a file
     upload_aggregate_form_field "$upload_field_name.md5"
"$upload_file_md5";
     upload_aggregate_form_field "$upload_field_name.size"
"$upload_file_size";
     upload_pass_form_field "^submit$|^description$";
     upload_cleanup 400 404 499 500-505;
   }
   location @test {
     default_type text/html;
     echo "OK";
   }
   location /uploadform {
     default_type text/html;
     echo '<html><head><title>Test
upload</title></head><body><h2>Select files to upload</h2><form
name="upload" method="POST" enctype="multipart/form-data"
action="/upload"><input type="file" name="file1"><br><input
type="file" name="file2"><br><input type="submit" name="submit"
value="Upload"><input type="hidden" name="test"
value="value"></form></body></html>';
   }
}


Лога:

63.82.5.67 - - [28/Mar/2011:17:30:29 -0700] "POST /upload HTTP/1.1" 0
0 "http://testserver/uploadform"; "Mozilla/5.0 (X11; Linux i686;
rv:2.0) Gecko/20100101 Firefox/4.0"


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.