<div dir="ltr"><div class="gmail_quote">2011/12/14 David Ronkin <span dir="ltr"><<a href="mailto:dronkin@gmail.com">dronkin@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 .8ex;border-left:1px #ccc solid;border-right:1px #ccc solid;padding-left:1ex;padding-right:1ex">
<div dir="rtl"><div dir="ltr">Call it asynchronously with ajax or jquery get/post - while waiting for response you can print whatever you what.<br></div></div></blockquote><div><br>I second that - that's, for instance, how Google's auto-completion (of
addresses in gmail, search terms in search etc) works - it sets a
background JavaScript thread which runs every second in the background,
reads the input field's value and submit it to the server for process if
it changed (and pulls the results, of course). You can skip the "check input field value" part in your
case. There must be some JavaScript libraries which can already help you there (<a href="http://jquery.com/">http://jquery.com/</a> is the first suspect, but there must be many more lying around).<br>
<br>
Two less related points:<br>
<br>
1. Make sure you verify the URL for any hockery-pockery (e.g. that it's a
genuine legitimate "http(s)://" URL and not, for instance
"file:///etc/passwd" or trying to break out of the shell parameter quoting to inject its own shell commands or encoded javascript that can be used for
cross-site-scripting :)<br>
<br>
2. While I'm looking for work, I might be available for such small jobs
(I'm not a JavaScript Guru, more of a server-side guy, but should be
able to do something like this with some research).<br>
<br>
--Amos<br> </div><blockquote class="gmail_quote" style="margin:0pt 0.8ex;border-left:1px solid rgb(204,204,204);border-right:1px solid rgb(204,204,204);padding-left:1ex;padding-right:1ex"><div dir="rtl"><div dir="ltr"><br>
</div><div dir="ltr">David</div><div dir="ltr"><br></div><div dir="ltr">
<div dir="ltr">
-- <br></div><div dir="ltr">בברכה, <br>דוד רונקין<br><div>נא בקרו בבלוג שלי: <a href="http://dronkin.blogspot.com/" target="_blank">http://dronkin.blogspot.com</a> </div></div></div><div dir="ltr">
<br></div><div dir="ltr"><br></div><div class="gmail_quote" dir="ltr"><div class="im"><div>2011/12/13 Hetz Ben Hamo <span dir="ltr"><<a href="mailto:hetzbh@gmail.com" target="_blank">hetzbh@gmail.com</a>></span></div>
</div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="h5">
<div>Hi,
<div><br></div><div>I've written a simple bash script to upload a file from a remote server as a CGI script (yes, I know, I should use another language, but it's just a proof-of-concept).</div><div><br></div><div>
It goes like this: A simple HTML page gives the user a text line to enter a URL and "upload" button, which submits the data using POST to a bash script (I use the proccgi for transferring the values).</div><div>
<br></div><div>The scripts fetches the URL and launches wget to grab the file, rename it and move it to a specific directory.</div><div><br></div><div>So far, so good. The script works well.</div><div><br></div><div>But I have one issue with it: those files are pretty big (1-3 GB) and wget doesn't show anything while it uploads - in the web browser. I tried using some redirect tricks, but it still doesn't show anything on the screen. I can redirect the output to a text file and show it after the upload, but it defeats the purpose of showing some activity.</div>
<div><br></div><div>So my question: how can I make WGET (or CURL) show anything on my browser while it downloads the file (uploading it to the server)?</div><div><br></div><div>Thanks,</div><div>Hetz</div></div>
<br></div></div>_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il" target="_blank">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
<br></blockquote></div><div dir="ltr"><br><br clear="all"></div><div dir="ltr"><br></div><div dir="ltr"> </div><div dir="ltr"><div><br></div><div><br></div><div><br></div></div><div dir="ltr"><br></div>
</div>
<br>_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">
<a href="http://www.linkedin.com/in/gliderflyer" target="_blank">
<span>
<img src="http://s4.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x25.png" alt="View my profile on LinkedIn" height="25" width="160">
</span></a></div><br>
</div>