Safari's XMLHttpRequest's send() method supports a File argument. Firefox does not (yet).
How can I check if this is supported? In Firefox, it will just behave as if an empty string was passed.
I'm trying to avoid doing browser version detection.
Edit: FF 3.6 does seem to support it, but the question is still relevant for older versions or other browsers.
status property returns the numerical HTTP status code of the XMLHttpRequest 's response. Before the request completes, the value of status is 0. Browsers also report a status of 0 in case of XMLHttpRequest errors.
The XMLHttpRequest method send() sends the request to the server. If the request is asynchronous (which is the default), this method returns as soon as the request is sent and the result is delivered using events.
It's possible that if the File object can be created, than send supports it. In Gecko (firefox,) that will be true (File and the send's File compatibility were both released in 1.9 according to MDC)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With