← Back to team overview

ubuntuone-users team mailing list archive

Re: upload files from shell

 

On 07/30/2009 05:22 PM, Shane Fagan wrote:
> The client is written in python so yes but id say they wouldnt want any
> unauthorised programs uploading.

Hi Shane, I really appreciate your statement as that tells me you are
trying to be respectful of our efforts to keep the service up and
running :). Thats really cool.

As one of architects of Ubuntu One, I'd like to just go on public record
as disagreeing with the statement about unauthorized programs though -
I'd be absolutely delighted if people wrote their own code to interact
with various parts of the Ubuntu One service, including the file sharing
service. No permission needed. I'll just outline some of the options here:

You can do a POST or GET to the web upload interface if you have the
right cookie from your browser, just the same as our web UI does to
upload and download files. There is also an undocumented JSON api that
the web UI uses to get and display all the file metadata (via AJAX).
That same JSON API can be used with OAuth instead of browser cookies,
but we haven't talked about it yet because we don't have any docs yet.
So, for example you could write your own web UI that displayed your
Ubuntu One files - or integrate it into another web application that you
use such as LinkedIn or Facebook or whatever.

You can also write your own program in any language that uses the
ubuntuone-storage-protocol code. If you are using python it's
considerably simpler, and I think we have an example around somewhere
that we should publish. Also you can look at u1sync to get a good idea,
it's much simpler than the core syncdaemon code (because it does a lot
less).

If you have an ubuntu one account, you are welcome to access the service
using any kind of unauthorized program that you want, just be nice and
don't DOS the servers, and don't expect any sympathy if you delete your
own files :). The OAuth mechanism will prevent you from accessing any
files that you shouldn't, and naturally if we detected anyone trying to
 break into another persons account we would take the appropriate legal
action.

At some point, we will also have a staging environment that you could
test your own (or our) client code against if you aren't quite sure
about it yet. Don't forget to stop by #ubuntuone if you have any
protocol or code questions, and check out the brand new
python-desktopcouch package in Karmic, that enables another interesting
type of storage that will be able to connect to Ubuntu One- CouchDB.

I'm sorry we don't have a nice developer intro site up yet, outlining
this kind of information and giving example programs. We will have those
up at some point after we get some of the more critical bugs fixed and
have things all set for the Karmic release. We'll also do some
screencasts showing how to get started.

If anyone writes client for for ubuntu one, I'm happy to explain how
launchpad can host the code for you, give you a place to track bugs, and
a PPA to publish your package easily to other Ubuntu One users. I'm also
very interested in adding other tools into the official Ubuntu One
packages if anyone writes things that they feel would be broadly useful.

Finally, there should be an announcement next week about the public
Ubuntu One test suite, which exercises the install ubuntuone-client code
against our live servers, and I hope some of you reading this list will
contribute test cases to help break both our clients and servers, and
help us run the test suite on a variety of hardware and Ubuntu versions :)

Happy hacking!

-elliot

Attachment: signature.asc
Description: OpenPGP digital signature


References