Boris Zbarsky wrote:
>
> > It's not a matter of the wrong mime type, it's a matter of the wrong file.
>
> Agreed. That should indeed be addessed. Not very easy to do, though...
>
Yes, but most of it is just careful attention to detail. Now to find more
people who understand. :-)
>
> Pretty nontrivial to make, this distinction... What is a "default type"?
>
Let's assume that mozilla uses "application/octet-stream" for any file it
doesn't understand. That's the default type. I'm saying that treating a file
(or any object) as "application/octet-stream" is different from knowing the
file is "application/octet-stream" and mozilla should keep these cases
distinct.
>
> That's what happens, but the data block is created before the file has been
> opened and all. See nsHTMLInputElement.cpp and nsFormSubmission.cpp.
>
> Boris
I only took a quick look at these files so I'm probably missing something but
I found the nsFSMultipartFormData class in nsFormSubmission.cpp which talks
about multiplexing string and file streams. Although this class doesn't do
what you need it does suggest that the necessary technique is known and should
be easily adapted. Or I'm just wrong.
--
Saturn
2003-09-03 11:18:26.723 UTC (JD 2452885.971143)
X = -0.823774878, Y = 8.296162651, Z = 3.462100072
X' = -0.005852977, Y' = -0.000574919, Z' = 0.000014507