Yeah that's what I wanted to do initially. auth_basic + ajax that would authenticate and receive a username/password for upload (the username and password would be changed every few seconds). The problem is that you cant authenticate and upload at the same time with javascript. Asking a user to write in a password is out of the question.
<div><br><br><div class="gmail_quote">On Dec 3, 2007 8:38 AM, Igor Sysoev &lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">On Mon, Dec 03, 2007 at 07:22:40AM +0100, Rapsey wrote:<br><br>&gt; I don&#39;t like the idea that anyone is able to upload a file to my server (up<br>&gt; to client_max_body_size), without authorizing himself. Maybe I&#39;m paranoid.
<br>&gt; I was just wondering if there is a way to do authorization first. I can&#39;t<br>&gt; find anything in the wiki but nginx configuration is full of clever ways to<br>&gt; do something that are not apparent.<br>&gt;
<br><br></div>If you use basic authorization, then as it was suggested you may use<br><br> &nbsp; location /upload/ {<br><br> &nbsp; &nbsp; &nbsp; limit_expect &nbsp;GET &nbsp;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; auth_basic &nbsp; &nbsp;...<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; auth_basic_user_file<br><div>
<div></div><div class="Wj3C7c"> &nbsp; &nbsp; &nbsp; }<br><br>&gt; On Dec 2, 2007 10:11 PM, Alex Egg &lt;<a href="mailto:eggie5@gmail.com">eggie5@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; &gt; isnt this &nbsp;a higher &nbsp;level question unrelated &nbsp;to nginx? perhaps your
<br>&gt; &gt; back end software ?<br>&gt; &gt;<br>&gt; &gt; On 12/2/07, Rapsey &lt;<a href="mailto:rapsey@gmail.com">rapsey@gmail.com</a>&gt; wrote:<br>&gt; &gt; &gt; A fastcgi application receives an uploaded file only after it has been
<br>&gt; &gt; &gt; uploaded, how do you then prevent just anyone (or anything) from<br>&gt; &gt; uploading a<br>&gt; &gt; &gt; file?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; thank you,<br>&gt; &gt; &gt; Sergej
<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br><br></div></div><font color="#888888">--<br>Igor Sysoev<br><a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br><br></font></blockquote></div><br></div>