Download different resource types in one zip file

Comments

4 comments

  • Official comment
    Avatar
    Aleksandar Kostadinov

    Hi Dima,

    Thanks for your message.

    Yes, this is indeed supported, however, it's a relatively new addition so the documentation is still being worked on.

    To do this, you can make use of what we call fully_qualified_public_ids. This is where as part of the generate_zip or archive method, you specify not only the public_ids but also the resource_type and type. Then you would set the resource_type parameter in the method call to "auto".

    Below is an example in PHP.

    $public_ids = [
    "image/upload/image_example",
    "video/upload/video_example",
    "raw/upload/text_file.txt,
    ];

    Uploader::create_zip(
    array(
        "resource_type" => "auto",
        "fully_qualified_public_ids" => $public_ids
    )
    );

    Please try this out and let me know how it goes.

    Best regards,

    Aleksandar

    Comment actions Permalink
  • Avatar
    dima

    Hi Aleksandar.

    That works like a charm! Thank you very much :)

    0
    Comment actions Permalink
  • Avatar
    Anthony Edward Del Pozo Matías

    Hello Aleksandar,

    I tried downloading different types of resources in a zip file with the download_zip_url method via the Python SDK, but found that resource_type = "auto" does not work.

    I did the solution you posted, but it doesn't work. Is there currently a method to download zip urls with files from different types of resources?

    Many thanks in advance.

    0
    Comment actions Permalink
  • Avatar
    Loic Verger Del Bove

    Hi Anthony,

    Can you please share the code you are using? Are you using the `fully_qualified_public_ids` parameter to define the list of public_ids? It won't work if you use `public_ids` but should work with the parameter above.

    Thanks in advance.

    Best,

    Loic

    0
    Comment actions Permalink

Please sign in to leave a comment.