6 ms·
Yet another nice stab at the problem. But every time I look through a component like this, it simply does not work. The corner cases kill you with end user comp
by meanguy 15y ago
Yet another nice stab at the problem. But every time I look through a component like this, it simply does not work. The corner cases kill you with end user complaints.
No fault of the engineer:
THIS NEEDS TO GET BUILT INTO THE DAMN BROWSER.
Yes. Upload. With an actual progress bar. Built into the app you sit in all day. Imagine that.
Sending messages to a PHP server script so you can have the server tell you how many bytes were sent? Even the dumbest terminals knew how to show a bytes uploaded count with XMODEM in 1977.
Google Music installs a friggin client app to hash and upload your songs. DropBox still can't get drag and drop working and STILL limits files to 150MB if you upload via HTTP.
This is such a basic scenario I simply don't understand why it hasn't been solved. And don't even get me started on the Upload Straight to Amazon S3 via Flash/Silverlight doodads. Nobody can seem to get those working reliably either.
- pfraze 15y agoHow hard would it be to use the FTP protocol for uploads? A couple of browsers have support native... I'll look into that. Edit: yeah, could probably be done with a java applet, possibly hidden. Not sure if it would get all the benefits you're looking for, but I do know the FTP protocol gives upload progress (at least).
- mwsherman 15y agoAgree. This is a beautiful implementation, given the state of browsers, but “moving files from one computer to another” seems like it was a solved problem a long time ago. (See also, editing rich text.)
- grayrest 15y ago> (See also, editing rich text.) I've spent months on this problem. The challenge is that the behavior you want (text ranges) does not map well onto the DOM (trees). This takes some thought but isn't THAT bad. Browser bugs also play a role since the code paths aren't used that often but the main reason is the w3c Range API is the worst API I am aware of in any language and everything you could use to replace it is not cross browser.
- batpad 15y agothis!! I know this is a bit off in a tangent, but after spending a week with the Range API and contenteditable, the frustration is truly immense .. it is truly astounding that file upload and rich text editing, yes, two of the most basic things, are not really solved problems on the web. It's amazing. But also kind've exciting :)
- Terretta 15y ago> This is such a basic scenario I simply don't understand why it hasn't been solved. And don't even get me started on the Upload Straight to Amazon S3 via Flash/Silverlight doodads. Nobody can seem to get those working reliably either. We have > 4GB uploads to S3 working reliably (original video files for encoding are quite large so long uploads are not an edge case for us). You can multi-select files, and the user sees upload progress percentages on all of them. We're using Silverlight (with less reliable Flash and HTML5 fallbacks).
- huhtenberg 15y ago> Sending messages to a PHP server script so you can have the server tell you how many bytes were sent? Psst.. XMLHttpRequestUpload † It's the downloading with Ajax that is the problem. There's no way to tell how big the file is.
- meanguy 15y agoPsst.. var xhr = $.ajax({ type: "HEAD", ... xhr.getResponseHeader('Content-Length') I wound up using Silverlight. Sigh.
- gambler 15y agoMy thoughts exactly. Worse, it's not the only problem like this, even though it's probably the most common and annoying one, and the one that's not solved well by various workarounds. (Date picking is a close second. And yes, I'm aware of the corresponding HTML5 input type. It's still not supported in any major browsers.) I don't understand why this isn't solved, but even more so I don't understand why most people seem to be perfectly happy with the current state of things. In fact, I get the impressions most web developers like this. They like writing scripts to solve trivial problems or finding obscure scripts that do it for them. Makes them feel helpful and important, or something. Me? Makes me angry. This should have been conclusively solved a decade ago. I'm seriously considering writing my own toy browser. Not that someone will use it, but at least I will be able to tell for sure how difficult is it to solve all these trivial problems.
- Hixie 15y agoPlease do. One of the goals of writing the contemporary HTML spec was to make it easier to make a Web browser by actually defining all the difficult things that browsers have to do. (It used to be really hard to make a browser because literally half the work was reverse-engineering other browsers.)