Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


cURL help
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

cURL help

netomxnetomx Moderator, Veteran

Hi, I am working on a cli for hubiC, based on linux bash and cURL. My problem relies on downloading a file. Anyone knows on hubiC (or OpenStack) commands on downloading a file?

Thanks

Comments

  • What about this one:

    curl -H "X-Auth-Token: " https://lb1.hubic.ovh.net/v1//default/ -i -X GET -o 
    

    Source: https://www.tiernanotoole.ie/2015/03/31/HubiC_SWIFT_CURL.html
    But as it should be plain OpenStack after the authentication dance, there should be many more ways...

  • netomxnetomx Moderator, Veteran

    @Bochi said:
    What about this one:

    > curl -H "X-Auth-Token: " https://lb1.hubic.ovh.net/v1//default/ -i -X GET -o 
    > 

    Source: https://www.tiernanotoole.ie/2015/03/31/HubiC_SWIFT_CURL.html
    But as it should be plain OpenStack after the authentication dance, there should be many more ways...

    Doesn't work, a he said, when you list the files, it should give you the location, but I receive:

        {
            "bytes": 631801957,
            "content_type": "video/x-matroska",
            "hash": "7c159940600d59882c1c615b75da5817",
            "last_modified": "2015-12-17T19:03:06.794710",
            "name": "[HorribleSubs] Debian 9 - 02 [720p].mkv"
        }
    

    As an example. It doesn't give you the location, and the default/name doesn't work

    Thanked by 1yomero
  • Just checked the OpenStack API and compared the example response with the one you are getting, seems fine.
    So what exactly doesn't work when you try to retrieve the file with the name (alias location)? Did you think of appending the container thats files you were listing?

  • netomxnetomx Moderator, Veteran
    edited December 2015

    It says 404 error.

    As you can see here: https://github.com/netomx/hubiccli

    I can list and upload files just fine, but I can't download :c

    EDIT 1:

    This is the command:

    curl -g -H "X-Auth-Token: token" "https://lbXXXX.hubic.ovh.net/v1/AUTH_numbers/default/Debian - 01.mkv" -i -X GET -o test.mkv

    And returns: 400 bad request.

    EDIT 2: Seems to be with the URL, bc I try without spaces and works great. Will check.

  • BochiBochi Member
    edited December 2015

    Hm...let me give it a quick look.
    In the meantime, a naive standard test: Did you try a file without space in the name?

    /EDIT/

    @netomx said:
    Seems to be with the URL, bc I try without spaces and works great. Will check.

    Yay, I knew it! :P
    Well, then try to encode your space and special characters in the request. ;)

  • netomxnetomx Moderator, Veteran

    Rdy, check my other thread :)

Sign In or Register to comment.