Hector Pizarro [EMAIL PROTECTED] writes:
[...]
If the user closes the popup in the middle of an upload, Apache::Request
parse() isn't throwing any error, and all the following code in my module
savesthe file incomplete in the system, which of course is garbage data.
Is this a bug, an incomplete feature, or is my configuration?
It's probably a bug in c/apache_multipart_buffer.c. We may not
do error-checking well enough on fill_buffer().
If parse is supposed to return an error code, which one is that? 206 =
HTTP_PARTIAL_CONTENT?
No, that's not an error code. Since the error here seems
to arise from ap_get_client_block, $r-status should probably
be -1.
Ok, now let's suppose that this error is fixed.
With a patch, I hope ;-).
I want to do several uploads fromthe same popup at once, so I have 5
file boxes in the form. If the user closesthe popup before the process
ends, i'd like to save only the completed files, how could I check
which files are correctly uploaded, and which ones are incomplete?
You could just ignore the final upload object, which has no - next
pointer:
for (my $u = $req-upload; $u $u-next; $u = $u-next) {
# do something with $u
}
--
Joe Schaefer