If the user uploads a large file, can I use something (maybe
threading) to send a response page immediately?
Or does the file have to be fully uploaded before a response can be
generated? Is there a way to upload essentially in the background
while the rest of the page does it's thing? Any suggestions on how to
handle this would be hugely appreciated since I'm pretty much a big
nub.
Regards,
-Dougal
Is there any way to accomodate non-JS enabled browsers? If I use a
regular form-post to another page, the user would definitely need to
wait while the file gets uploaded, right?
-Dougal
This is inherent to the way HTTP POST requests work. When you (as a
browser) want to submit a form through POST, you have to send this to
the server. Only AFTER your request (which is what it is; even a form
submission is a request on the HTTP level) has been received by the
server can it send you a reply. That is HTTP, nothing you can do about
it. This means that if your form is big, you will have to wait for a
long time. Unless you use some javascript tricks, like Sutabi suggested.
For more information, see RFC 2616 [1].
b^4
Cheers,
-d
On May 31, 3:54 pm, bubblboy <bubbl...@gmail.com> wrote:
Could it be a config issue or a permissions issue?
My config file looks vaguely like:
url.rewrite-once = (
"^/dgraham3/favicon.ico$" => "/dgraham3/static/favicon.ico",
"^/dgraham3/static/(.*)$" => "/dgraham3/static/$1",
"^/dgraham3(.*)$" => "/dgraham3/index.py/$1",
)
fastcgi.server = ( ".fcgi" =>
( "localhost" =>
( "min-procs" => 1,
"socket" => "/tmp/fcgi.sock",
"bin-path" => "/Library/WebServer/Documents/dgraham3/
index.py"
)
)
)
On May 31, 7:05 pm, "Adomas Paltanavičius"
<adomas.paltanavic...@gmail.com> wrote:
> Not to mention you can display upload progress, e.g. if using lighttpd
> that comes pretty easy:http://trac.lighttpd.net/trac/wiki/Docs:ModUploadProgress
>
Unfortunately, now the app is being executed, but only sort of. I just
get the words "not found". I don't think it's a server error because
there's no associated error code... I'm hoping you might have an idea
of what might be wrong now, and I'd be happy to provide more info if
you let me know what might help.
Thanks for getting me this far!
-dougal
Congratulations: web.py is working. To proceed I recommend you read the
tutorial at [1].
On a side note, let me go out on a leg and speak freely: I suggest you
get yourself more familiar with the HTTP protocol and the difference
between HTTP and HTML if you intend to do serious work with web.py.
Maybe I am mistaking, but from the way you talk about error codes I am
guessing you are not informed about what part of the connection actually
contains the error code and what part is just intended to please humans.
If you have telnet or netcat I recommend you try to play with connecting
those applications to your (or any other HTTP) server on port 80 and
send HTTP headers yourself, such as "GET / HTTP/1.0". The HTTP/1.1 RFC
[2] is the "official" document on the latest version of HTTP. Be aware,
though, that this document is long and tedious (read: boring as hell),
so I recommend a search engine and a query like "how http works".
Good luck and greetings,
b^4
[1]: <http://webpy.infogami.com/tutorial2>
[2]: <http://ietf.org/rfc/rfc2616.txt>
Thanks for the tips and the links, I will be hitting Google.
-dougal
On Jun 1, 3:53 pm, bubblboy <bubbl...@gmail.com> wrote: