in reply to Re: Yet another CGI Upload problem - not like the others!
in thread Yet another CGI Upload problem - not like the others!
I think the last line is that bit that made the crucial difference. I didn't know that about 'read'.
I'm glad you've got everything working, but I doubt that the check for read failure was the cause of your problems.
Annoying general advice follows... please feel free to ignore :-)
Unless what you're doing is urgent, I would spend the time and figure out the exact cause of the problem. Take your failing code and add some print statements to find out what's going on, remove code that's not relevant, etc. until the error goes - then back up a step. Look at what caused the error. Try and see why you did it that way - that way you can avoid the problem in the future.
Also, unless you know exactly what caused the error - you don't know 100% that you've fixed it. Maybe there is an edge case somewhere that you're missing?
Learning from your mistakes is a terrible cliche I know, but it's true nevertheless. It's better to learn how to not put the bugs in, rather than learn how to fix the bugs :-)
|
|---|