tencent cloud


Multi-File Zipping

Terakhir diperbarui:2022-12-16 14:18:39


    The multi-file zipping feature of COS based on SCF allows you to add multi-file zipping rules to your bucket. You can specify the URLs of files that need to be zipped, and then trigger the cloud function to zip the files and save the generated package to the specified path in the bucket.


    • The generated package cannot be larger than 50 GB.
    • If you have added a multi-file zipping function rule to your bucket via the COS console, the function will appear in the SCF console. DO NOT delete the function. Otherwise, your rule may not take effect.
    • Multi-file zipping is supported in SCF-enabled regions, including Guangzhou, Shanghai, Beijing, Chengdu, Hong Kong (China), Singapore, Mumbai, Toronto, and Silicon Valley. For more supported regions, see the SCF documentation.
    • If an error is reported when you perform multi-file zipping, click View Log on the right of the function to quickly redirect to the SCF console to view the error logs.
    • Multi-file zipping is not supported for files stored in the ARCHIVE or DEEP ARCHIVE storage classes. To zip these files, you need to restore them first. For detailed directions, see Restoring Archived Objects.
    • Multi-file zipping depends on the SCF service, which provides users with a free tier. You will be billed for the part exceeding the free tier limit according to SCF pricing. Note that the more and larger the files you zip, the more resources will be used; the more often you zip your files, the more calling times will be incurred.


    1. Log in to the COS console.
    2. On the left sidebar, click App Integration > Extended Features and find Multi-file Zipping.
    3. Click Configure API Access to enter the configuration page.

      If you haven't activated SCF, go to the SCF console to activate it and authorize the service as instructed.

    4. Click Add Function and configure the following parameters:
    • Function Name: Uniquely identifies a function and cannot be modified after it is created. You can view the function in the SCF console.

    • Execution Method: Execution method for the function. If you set this field to Sync, the execution results will be returned after the zipping task is complete. If you set this field to Async, the function will respond directly and execute the zipping task in the background.

    • Authentication Method: Authentication method for the function

      • If you select SCF, you need to trigger the function by using a role that has permission to call the function.

      • If you select No, you need to select an appropriate API gateway to receive requests. If you don't have an API gateway in this region, click Create API Gateway service, and we will configure an API gateway suitable for this function in this region.

    • API Path/Request Method: For more information on API gateway configurations, see Overview.

    • SCF Authorization: You need to authorize SCF so that it can read files in your bucket and save the generated package to the specified path.

    1. Click Confirm.

    2. Click Instructions to view the field description, where ClientContext is in JSON format. For the configuration demo, see Using APIs to Zip Files.

    3. Click Next to go to Calling Test page.

    4. Click Start, and the function will be called as configured. You can view the response of the function in Response.

    5. You can perform the following operations on the created function:

    • Click Log to view the historical running status of multi-file zipping functions. If an error is reported, you can click Log to quickly redirect to the SCF console to view the error log details.
    • Click More > Edit to modify the multi-file zipping rule.
    • Click More > Delete to delete an unwanted multi-file zipping function.
    Hubungi Kami

    Hubungi tim penjualan atau penasihat bisnis kami untuk membantu bisnis Anda.

    Dukungan Teknis

    Buka tiket jika Anda mencari bantuan lebih lanjut. Tiket kami tersedia 7x24.

    Dukungan Telepon 7x24