sorry to butt in, but it's quite interesting to me too...

[EMAIL PROTECTED] a écrit :

> If I understand what you want to do, the quick answer is that you can't
> do it. Even at the level of mod_python, sending back a response before
> all data has been read is unlikely to prevent the client from sending
> all data in the first place. Even if you used some AJAX magic which

is it possible to just get the first few packets of data (any amount,
just some amount) to be able to see how big the upload is going to be
(as per the header from the client), and then get the data chunk by
chunk? that it's not 1kB chunks exactly wouldn't matter to me (maybe it
does to the OP, though).
And what about, if we decide it's too big or wrong or whatever, having
the view (or whichever part would be getting this data) send back a
response immediately?
and since we have the socket object buried in there (don't we?), can't
we close() it then?

i do realize that the client might not notice, and might keep
uploading, but i'm just wondering.

In my case, what i'm interested in is to know how much data is coming
my way, have the option to close the socket if it's too big, and if
not, be able to send upload progress data back to the client's js. I'm
sure this has been covered previously, but last time i checked the
options were mostly centered on having the upload go to a cgi-bin perl
or python file which would then do this in a more raw fashion. Is there
now an alternative way through django? or mod_python?

(where is the mod_python mailing list archive? i can't seem to find it.
feel free to just point me to it if it's all covered there, and i
apologize in advance if it is).

thanks!


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to