Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Patch adding demo non-flash upload widget with progress #7
In my never ending quest to rid the world of dodgy plug-ins like Flash, I have constructed for you a demonstration of an uploader which does everything SWFUpload does, but with Flash! So far it has been tested on FF >=4 and Chromium 6, makes no sense on pyjd. No idea about IE, sorry. Also included a little demo wsgi script, which is probably very bad.
Patch attached, could this go in before the next release please?
Original issue: http://code.google.com/p/pyjamas/issues/detail?id=716 (April 11, 2012 00:14:35)
From luke.lei...@gmail.com on April 14, 2012 17:08:51:
also, you see in library/pyjamas/HTTPRequest.py, it has doCreateXmlHTTPRequest? that's very important, for both pyjd and pyjs variants (browsers etc.) to have in there.
the pyjamas HTTPRequest.py has encoded over quite a long time (years) all of the expertise needed. see HTTPRequest.ie6.py, it uses onreadystatechange already?
it would be far, far better for you to patch HTTPRequest to add onprogress notification.
i'll add this for now, but it needs sorting. don't be afraid to add extra stuff to the base pyjamas code, ok!
From jameskhe...@gmail.com on April 15, 2012 21:26:08:
What should the IE override do then? I shouldn't think it should silently fail, right? Also, pyjd... I'm thinking there would never be a situation where you'd want to upload from the desktop, would there?
From luke.lei...@gmail.com on April 17, 2012 16:25:09:
i really don't know what to do about IE. perhaps, in the HTTPRequest.ie6.py just try doing an XMLHttpRequest object not an MSXML2 ActiveXObject, then, if that succeeds, test for it (somehow?) in HTTPRequest.browser.py, and allow progress notification.
all the notification systems i've seen that involve timers actually query a server "how far has progress got?" (!!!)
so... given that it's not essential, i'd say don't worry about it, but try to help people who have IE8 (IE8 supports proper HTML5 XmlHttpRequest)