G’day Fellas
So its been few days since I release this Util. So that I don’t forget how to use it I better write down how it works and what to expect :).
NOT MAINTAINED AS OF JAN 2013. MAY STILL THOUGH.
Lets start by checking out how to use this Utility.
1 2 3 4 5 6 7 8 9 10 |
Usage: rscfpush -user=RackspaceUSER_NAME -apikey=yourRackspaceAPIKEY -location=US|UK -container=your_rackspace_container -uppath=file_or_folder_to_upload [options] ---options--- -ife means if exists at target container what would you wish to do with it? possbile values skip|overwrite|rename, 'rename' action will be applied to new file being uploaded. -ccine Create container if it does not exist on target. (available in Paid version) -mcpub make container public and return the public CDN path. (available in Paid version) -v verbose mode -help command help -online-help takes you to http://jaspreetchahal.org for more explanation. |
Download the util from
http://jaspreetchahal.org/rscfpush-exe-a-rackspace-cloud-files-command-line-uploader/
Test cases
I have tested this util for uploading files that were not greater than few MBs. If you are uploading files that are many 100s of Megs or Gigs then I am not sure whether this will work for you or not. But it is worth trying and then let me know the results.
Scenario 1
Lets upload a file to your RS Cloud Files Container. I am assuming that a container with name “test” exists and you have your CF username and your API key with you.
Lets explore.
The command
1 |
shell>rscfpush -user=rackspaceuser -apikey=ajlasjf0940234ljsflk -location=US -container=test -uppath=c:\demo\test.txt |
When you hit enter the Util test validity of you credentials and check if container exists and then starts to upload test.txt file to your conainter test.
This was simple.
Scenario 2
Lets upload a file to your RS Cloud Files Container. I am assuming that a container with name “test” may or may not exists and you have your CF username and your API key with you.
If you are ever unsure if the target container exists or not then it is always a good idea to include -ccine in your command
The command
1 |
shell>rscfpush -user=rackspaceuser -apikey=ajlasjf0940234ljsflk -location=US -container=test -uppath=c:\demo\test.txt -ccine |
When you hit enter the Util test validity of you credentials and check if container exists and then starts to upload test.txt file to your conainter test. Only change in above command is that we included -ccine switch which means that create container test if it does not exists.
This was simple.
Scenario 3
Lets upload a folder to your RS Cloud Files Container. I am assuming that a container with name “test” may or may not exists and you have your CF username and your API key with you.
The command
1 |
shell>rscfpush -user=rackspaceuser -apikey=ajlasjf0940234ljsflk -location=US -container=test -uppath=c:\demo\ -ccine |
When you hit enter the Util test validity of you credentials and check if container exists and then starts to upload all files under demo folder to your conainter test.
If demo directory has subdirectories in it then those files will be uploaded too but catch here is that they will be accessed with virtual path.
So say you have a file in c:\demo\folder\a.txt File a.txt will be uploaded with a virtual path as folder/a.txt
This will mean that If you CDN Url is say http://cdn123.rscdn.com/test/ then a.txt will be accessed as http://cdn123.rscdn.com/test/folder/a.txt
Other switches are common sense.
I hope this cleared few things that you may be looking for. If not then leave a comment and I will try to address your question.
Leave a Reply