The Artima Developer Community
Sponsored Link

Python Buzz Forum
Open-source infrastructure: Universal file uploader

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Phillip Pearson

Posts: 1083
Nickname: myelin
Registered: Aug, 2003

Phillip Pearson is a Python hacker from New Zealand
Open-source infrastructure: Universal file uploader Posted: Jan 7, 2006 8:10 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Phillip Pearson.
Original Post: Open-source infrastructure: Universal file uploader
Feed Title: Second p0st
Feed URL: http://www.myelin.co.nz/post/rss.xml
Feed Description: Tech notes and web hackery from the guy that brought you bzero, Python Community Server, the Blogging Ecosystem and the Internet Topic Exchange
Latest Python Buzz Posts
Latest Python Buzz Posts by Phillip Pearson
Latest Posts From Second p0st

Advertisement

Here's something I'd like to see: an open source project to produce client and server code to make it easy to upload files to websites.

It's not hard to add file/image upload support to a website, but some functions just work so much better on the client. If you can resize a 2MB JPEG down to 100K on the client, for example, you can send 100 photos over a 128K DSL line in 11 minutes rather than three and a half hours.

And... it seems that everything needs file/image upload support. Certainly all of our projects at work - Structured Blogging, OurMedia, GoingOn and PeopleAggregator, to name a few. Also a couple of my own personal projects, and pretty much every blogging tool. I think Marc has to resize images using Photoshop then upload them with FTP to get them on his blog. Wouldn't it be nice to be able to resize/crop inside a simple client and get the upload for free?

A few websites do this really well. Flickr's Uploadr is excellent. OurMedia users seem to have managed to upload quite a bit of audio and video with its uploader, so I assume it's not bad either. Then some sites don't use a client - Cyworld uses a Flash widget, which is OK, whereas MSN uses an ActiveX control that I completely failed to get to work on my neighbour's computer and haven't bothered to try at home. Outlook Express is good - it has an excellent little resize dialog that pops up when you e-mail image files.

... however, there doesn't seem to be a universal way to do this, that can be easily integrated into apps. So, who's gonna build it? :-)

- - -

Here's an initial stab at the Work required:

  • A client app like Flickr's Uploadr that can:
    • Resize/convert images
    • Upload multiple images.
    • Upload larger files - e.g. videos and audio recordings.
  • The server side plumbing for this:
    • Some way of hooking this into a website - perhaps using a small chunk of XML that gives authentication credentials and an ID for the image to be uploaded.
    • Protocol to receive large files over unreliable connections, perhaps using multiple HTTP requests. WebDAV might suit here, if it's implemtable in every brain-dead server environment.

Places to start to steal code for the client would be the FotoBilder client(s) and the OurMedia uploader.

- - -

The simplest way I can think of to hook this into apps would be to have an 'upload' link that pops up a Javascript window and sends you an XML file (with a mime type and defined extension - so it's easy to catch on the client side) which is picked up by the client. The XML file includes an authentication token and an image ID, which could be munged together into one opaque ID, and perhaps some parameters about what sort of files are acceptable (formats, sizes, number of files, ...). The client then makes HTTP requests (PUT requests, if you want to be fancy... perhaps a whole lot of them in series, for a large file, uploading 300K-1M or so at a time) back to the server to send all the files, sending back the auth token as it goes.

The Javascript window could poll the server for status, perhaps holding open a persistent connection. When the uploads are complete, the server would tell it about the received image and perhaps send back a URL of a thumbnail. The window would them close and the page requesting the image upload would be updated with the thumbnail and upload details.

Comments invited... is there an easier way to get the same functionality? Has someone already build this?

Comment

Read: Open-source infrastructure: Universal file uploader

Topic: CPS Ajaxification round #2 Previous Topic   Next Topic Topic: London 2.0rc2

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use