Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-11-23 Thread Anne van Kesteren
On Tue, 17 Nov 2009 18:31:51 -0200, Maciej Stachowiak m...@apple.com wrote: According to HTTP, I think sending no Content-Type more strongly indicates that you don't know the type. In particular, missing content type gives the recipient license to sniff the content. Ok, for Blob by default no

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-11-17 Thread Darin Fisher
On Tue, Nov 10, 2009 at 7:48 AM, Jonas Sicking jo...@sicking.cc wrote: Yay! On Tue, Nov 10, 2009 at 4:06 PM, Anne van Kesteren ann...@opera.com wrote: WebKit presently supports sending File. It does not support FileData yet. Is Content-Type set to anything specific if the author has

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-11-17 Thread Maciej Stachowiak
On Nov 17, 2009, at 10:32 AM, Darin Fisher wrote: On Tue, Nov 10, 2009 at 7:48 AM, Jonas Sicking jo...@sicking.cc wrote: Yay! On Tue, Nov 10, 2009 at 4:06 PM, Anne van Kesteren ann...@opera.com wrote: WebKit presently supports sending File. It does not support FileData yet. Is

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-11-10 Thread Anne van Kesteren
I added support for Blob and FormData to XMLHttpRequest Level 2 also based on the discussion at the F2F: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/ More comments below. On Tue, 20 Oct 2009 10:28:57 -0700, Darin Fisher da...@chromium.org wrote: Sorry... I just meant that I need to

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-11-10 Thread Jonas Sicking
Yay! On Tue, Nov 10, 2009 at 4:06 PM, Anne van Kesteren ann...@opera.com wrote: WebKit presently supports sending File.  It does not support FileData yet. Is Content-Type set to anything specific if the author has not set it? // FIXME: Should we set a Content-Type if one is not set. ^^^

re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-10-20 Thread Darin Fisher
I'd like to revive the Proposal for sending multiple files via XMLHttpRequest.send() thread started by Jian Li back in September. As pointed out on that thread, sending a JS array of strings and File references isn't going to fly due to an array of strings already having meaning. That thread

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-10-20 Thread Anne van Kesteren
On Tue, 20 Oct 2009 08:55:21 +0200, Darin Fisher da...@chromium.org wrote: I'd like to revive the Proposal for sending multiple files via XMLHttpRequest.send() thread started by Jian Li back in September. As pointed out on that thread, sending a JS array of strings and File references isn't

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-10-20 Thread Darin Fisher
On Tue, Oct 20, 2009 at 1:37 AM, Anne van Kesteren ann...@opera.com wrote: On Tue, 20 Oct 2009 08:55:21 +0200, Darin Fisher da...@chromium.org wrote: I'd like to revive the Proposal for sending multiple files via XMLHttpRequest.send() thread started by Jian Li back in September

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-10-20 Thread Anne van Kesteren
On Tue, 20 Oct 2009 10:56:47 +0200, Darin Fisher da...@chromium.org wrote: On Tue, Oct 20, 2009 at 1:37 AM, Anne van Kesteren ann...@opera.com wrote: I think for a lot of authors the easiest would be easiest if it was in the form of multipart/form-data as then they do not have to do anything

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-10-20 Thread Anne van Kesteren
On Tue, 20 Oct 2009 18:27:36 +0200, Darin Fisher da...@chromium.org wrote: On Tue, Oct 20, 2009 at 4:31 AM, Anne van Kesteren ann...@opera.com wrote: If eventually we get native support for octet-arrays and all we can at that point add the ability to XMLHttpRequest so you can send anything

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-10-20 Thread Charles McCathieNevile
On Tue, 20 Oct 2009 18:47:59 +0200, Anne van Kesteren ann...@opera.com wrote: On Tue, 20 Oct 2009 18:27:36 +0200, Darin Fisher da...@chromium.org wrote: On Tue, Oct 20, 2009 at 4:31 AM, Anne van Kesteren ann...@opera.com wrote: If eventually we get native support for octet-arrays and all

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-14 Thread Yaar Schnitman
How is supposed the web application to detect that the browser supports this feature? Maybe instead of overloaded send, we should create new method sendFile(File) and sendFiles(File[]). And between the two approaches, the first one is simpler, but the second one allows to send the files

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-14 Thread Michael Nordman
What I think we really want is a script-only means of sending multipart form-data encoding POSTs that contain a mix of file- parts and binary-parts (in addition to the ability to send the raw contents of a file). * script-only, so these POSTs can be performed in workers * multipart form-data, its

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-14 Thread Jonas Sicking
2009/9/14 Michael Nordman micha...@google.com: What I think we really want is a script-only means of sending multipart form-data encoding POSTs that contain a mix of file- parts and binary-parts (in addition to the ability to send the raw contents of a file). * script-only, so these POSTs can

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-14 Thread Michael Nordman
On Mon, Sep 14, 2009 at 1:26 PM, Jonas Sicking jo...@sicking.cc wrote: 2009/9/14 Michael Nordman micha...@google.com: What I think we really want is a script-only means of sending multipart form-data encoding POSTs that contain a mix of file- parts and binary-parts (in addition to the

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-12 Thread Jian Li
Thank you for all your great feedbacks. Yes, the first approach is simpler and it requites far less work from the author and thus less error prone. However, I think the second approach does provide more flexibilities that might fit for the different data assembling and sending purpose. The author

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-12 Thread Jonas Sicking
On Fri, Sep 11, 2009 at 11:46 PM, Jian Li jia...@chromium.org wrote: Thank you for all your great feedbacks. Yes, the first approach is simpler and it requites far less work from the author and thus less error prone. However, I think the second approach does provide more flexibilities that

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-12 Thread Alfonso Martínez de Lizarrondo
Since XMLHttpRequest spec has already added the overload for send(document), why not just adding more overload for file and array of items? IMHO, having similar send*** methods, like sendFile, together with overloads of send() might make the API more complicated. If the browser doesn't

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-11 Thread Ryan Seddon
Mozilla has something similar already called sendAsBinary though it takes a string not an array https://developer.mozilla.org/en/XMLHttpRequest#sendAsBinary%28%29 On Thu, Sep 10, 2009 at 7:28 PM, Anne van Kesteren ann...@opera.com wrote: On Thu, 10 Sep 2009 03:12:52 +0200, Jian Li

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-11 Thread Anne van Kesteren
On Fri, 11 Sep 2009 02:28:26 +0200, Ryan Seddon seddon.r...@gmail.com wrote: Mozilla has something similar already called sendAsBinary though it takes a string not an array https://developer.mozilla.org/en/XMLHttpRequest#sendAsBinary%28%29 Besides that I think that representing octets by a

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-11 Thread Alfonso Martínez de Lizarrondo
2009/9/10 Jian Li jia...@chromium.org: There has already been a discussion on extending XMLHttpRequest.send() to take a File object. Could we also consider enhancing it further to support sending multiple files, like a FileList from the drag and drop. We could make XMLHttpRequest.send() take a

Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-10 Thread Jian Li
There has already been a discussion on extending XMLHttpRequest.send() to take a File object. Could we also consider enhancing it further to support sending multiple files, like a FileList from the drag and drop. We could make XMLHttpRequest.send() take a FileList object and let the browser add

Re: Proposal for sending multiple files via XMLHttpRequest.send()

2009-09-10 Thread Anne van Kesteren
On Thu, 10 Sep 2009 03:12:52 +0200, Jian Li jia...@chromium.org wrote: There has already been a discussion on extending XMLHttpRequest.send() to take a File object. Could we also consider enhancing it further to support sending multiple files, like a FileList from the drag and drop. We could