curllibcurlperfecto

Unable to upload actual file to target using CURL


I am using CURL commands in shell script file to download .apk file from one place and load it to another

wget -c https://example.net -O abc.apk

source="abc.apk"
dest="abc.apk"
securityToken="Actual Token"
url="https://another.com/services/repositories/GROUP:abc/${dest}?operation=upload&securityToken=${securityToken}&overwrite=true)"
curl -X POST -T "$source" "$url"

But I am not getting any error and even file is not getting uploaded.

When I run from VM I get:

{"errorMessage":"Failed to upload repository item - Value true) for overwrite parameter is not a valid boolean value."}

Note: Target URL is the Perfecto URL.


Solution

  • Our Perfecto curl documentation is here.

    I was able to upload a sample apk file with curl as follows:

    curl -X POST -T "abc.apk" "https://${CLOUD_NAME}.perfectomobile.com/services/repositories/media/PRIVATE:abc/abc.apk?operation=upload&securityToken=${YOUR-SECURITY-TOKEN}&overwrite=true"
    

    Note: CLOUD_NAME is your exact cloud name. E.g. demo is the cloud name of https://demo.perfectomobile.com cloud url.

    Kindly raise a support case by following here in case you get any issues with curl/ any Perfecto questions in general.