Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Single File Upload #105

Open
jessejamesrich opened this issue Jan 5, 2016 · 1 comment
Open

Single File Upload #105

jessejamesrich opened this issue Jan 5, 2016 · 1 comment

Comments

@jessejamesrich
Copy link

I can't find any examples of how to upload a single file which I'd like to do at runtime rather than run on a cronjob (I assume I have to run this as a cronjob?)

When running:

turbolift -u <USERNAME> -a <KEY> --os-rax-auth <DC> upload -c <CONTAINER> -s test.txt

This is what I get:

2016-01-05 12:54:40,054 - logger:INFO => Logger [ turbolift ] loaded
2016-01-05 12:54:40,055 - worker:INFO => Authenticating
Processing - [ \ ] - Please wait  iad
Done.
2016-01-05 12:54:40,385 - upload_items:INFO => Indexing File System...
2016-01-05 12:54:40,387 - exceptions:ERROR => No objects found to process. Check your command.
Done.
Traceback (most recent call last):
  File "/usr/local/bin/turbolift", line 9, in <module>
    load_entry_point('turbolift==3.0.0', 'console_scripts', 'turbolift')()
  File "build/bdist.linux-x86_64/egg/turbolift/executable.py", line 59, in execute
  File "build/bdist.linux-x86_64/egg/turbolift/worker.py", line 130, in run_manager
  File "build/bdist.linux-x86_64/egg/turbolift/methods/upload_items.py", line 34, in start
turbolift.exceptions.DirectoryFailure: No objects found to process. Check your command.
@cloudnull
Copy link
Owner

Hi @jessejamesrichard assuming your running turbolift from master you'll use the -o or --object flag. This will upload the single object. For more on uploads you can do the following for all of the supported options turbolift upload --help. Your example cron job could work as so:

turbolift -u <USERNAME> -a <KEY> --os-rax-auth <DC> upload -c <CONTAINER> --object test.txt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants