Updated on 2022-02-22 GMT+08:00

Downloading a File from OBS

This API is used to download a file from OBS.

  • API calling

    hilens.download_from_obs(url, download_to)

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Type

    Description

    url

    Yes

    Character string

    OBS resource link. For details on how to obtain the resource link, see Accessing an Object Using Its URL in the Object Storage Service Console Operation Guide.

    download_to

    Yes

    Character string

    Directory where the downloaded file is stored. You are advised to use an existing directory. The path contains a maximum of 256 characters.

  • Return value

    The value 0 indicates a success, and other values indicate a failure.