Hi Frank
Multipart/form-data was originally not supported because there didn't appear
to be a means to encode it but yesterday I found the FormData API which
provides that facility on FF4+, Chrome7+, Safari 5+ and a shim that
implements multipart/form-data encoding cross browsers so it's now the only
encoding used. This means that there isn't any special server coding
requirements, except you'll need to get the multipart/form-data working on
node.
John
From: franck34 <[email protected]>
Reply-To: <[email protected]>, qooxdoo Development
<[email protected]>
Date: Mon, 17 Oct 2011 20:18:02 +0200
To: qooxdoo Development <[email protected]>
Subject: Re: [qooxdoo-devel] UploadMgr contrib update released - multiple
widgets
Cool !
I'll test the update.
Don't worry for node, i'll send here the server side code to handle both
octet-stream and multipart/form-data content-type.
I already implement octet-stream, it's easy in fact.
But i was thinking (i didn"t go deeper in your code) that the usage of XHR
against usual form was depending of the browser.
So if it's the case, i was thinking about a flag to force usual form, i.e
multipart/form-data.
So people only having a server handling multipart/form-data will not be
blocked.
Do you see what i mean ?
On Mon, Oct 17, 2011 at 8:03 PM, John Spackman <[email protected]>
wrote:
> Hi Frank
>
> I've fixed the problem where the toolbar button's input element overlaps
> the other buttons on the toolbar - please checkout the latest version and
> let me know how you get on.
>
> There isn't an API to allow you to change the content type of the upload,
> principally because I had thought that it was not possible to encode the
> XHR request in that way - but I think I've just found an article on how
> that's not true in certain browser versions. I've run out of time today
> so I'll look at that tomorrow.
>
> Other than that I don't know what to suggest for your node.js problem,
> I've not used it enough, sorry!
>
> John
>
> On 15/10/2011 19:36, "franck34" <[email protected]> wrote:
>
>> >Yes. Very good.
>> >
>> >I'm using it right now.
>> >
>> >Notice i've changed a little behavior.
>> >
>> >Because i'm using a toolbarbutton, and there is some buttons before the
>> >uploadtoolbarbutton in my toolbar, the hidden input is going by default on
>> >top of buttons which are disposed at the left of the upload button.
>> >
>> >So i've added :
>> >* an "appear" listener for the button which set display:none in the styles
>> >of the file input.
>> >* Another one ("mouseover") to toggle display style property of the file
>> >input.
>> >* And 2 others ("mouseout" for the button, and "completeUpload" for the
>> >file) to toggle display style property of the file input.
>> >
>> >I only test with Google Chrome right now, but i need this working on
>> >majors
>> >browsers, i'll test later.
>> >
>> >So thanks a lot, it's working perfectly. Notice i've added a qooxdoo
>> >progress bar too and it's ... very nice !
>> >I'm using it into a BBCode editor i've made with realtime preview. BBCode
>> >parser is client side ;)
>> >
>> >BUT (it was to easy ??)
>> >
>> >Got a last problem, probably not qooxdoo or contrib side. I'm using
>> >node.js
>> >to handle uploaded files (notice i'm using google chrome to test, so
>> >content
>> >type is octet-stream), and, randomly, received files are not completely
>> >written. And i don't know yet where is it broken : it can be a browser bug
>> >regarding octet-stream file upload (i really doubt of that), it can be a
>> >problem in my code which is copying incoming http stream into a writeable
>> >stream (a file ..), and finaly, it can be a node.js bug (i'm using 4.0.12
>> >right now).
>> >
>> >If somebody is using node as a server to handle uploaded file, i'll really
>> >appreciate a little help :)
>> >
>> >Below the code i'm using node side (i'm using "connect")
>> >
>> >---------------
>> >
>> >app.post('/uploader',function(req,res) {
>> >
>> > // Open a file stream
>> > var ws=fs.createWriteStream(('/tmp/tmp.png',{flags: 'w',encoding:
>> >'binary',mode: 0666 });
>> >
>> > // Write HTTP data received into the file stream
>> > req.pipe(ws);
>> >
>> > // All data received
>> > req.on('end',function(r) {
>> >
>> > // File is supposed to be fully written on the disk
>> > ws.end();
>> >
>> > // Send 200 OK to the client
>> > res.writeHead(200);
>> > res.end();
>> > });
>> >});
>> >
>> >
>> >--
>> >View this message in context:
>> >http://qooxdoo.678.n2.nabble.com/UploadMgr-contrib-update-released-multipl
>> >e-widgets-tp6768144p6896287.html
>> >Sent from the qooxdoo mailing list archive at Nabble.com.
>> >
>> >--------------------------------------------------------------------------
>> >----
>> >All the data continuously generated in your IT infrastructure contains a
>> >definitive record of customers, application performance, security
>> >threats, fraudulent activity and more. Splunk takes this data and makes
>> >sense of it. Business sense. IT sense. Common sense.
>> >http://p.sf.net/sfu/splunk-d2d-oct
>> >_______________________________________________
>> >qooxdoo-devel mailing list
>> >[email protected]
>> >https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
----------------------------------------------------------------------------
-- All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security threats,
fraudulent activity and more. Splunk takes this data and makes sense of it.
Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct__________________________________________
_____ qooxdoo-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel