2

How can I get the public URL of a file via a command? I need to do this within a Lua script, so Python or whatever else API's are offered aren't any good.

1
  • Edit: Nevermind, I see the ubuntu-one tag now.
    – Oli
    Apr 7, 2011 at 15:29

1 Answer 1

4

To get a public URL for a file via the commandline, you do

u1sdtool --publish-file=filename

if the file is already published, it will return the existing URL; otherwise, it will publish the file and return the newly created URL.

2
  • Thank you... can you help perfect it? I can't quite figure it out, trying it on an already published file (while U1 is disconnected though... still uploading my music collection): paste.pocoo.org/show/44KX0W3KliP9tZikBtku Apr 9, 2011 at 11:31
  • add a backslash before the space in "Ubuntu One", or put quotes around the whole path.
    – Chipaca
    Apr 10, 2011 at 9:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .