How to Upload Files to Vultr CDN Push Zones

Updated on April 3, 2025

Uploading Files to Vultr CDN Push Zones enables you to directly transfer and store your content within the CDN infrastructure. Once your files are uploaded, they are distributed and cached across multiple edge servers within the Push Zones. This ensures that your content is delivered quickly and reliably to users from various locations worldwide. By utilizing this feature, you enhance the efficiency and performance of your content delivery, providing a better user experience through reduced load times and consistent availability.

Follow this guide to upload files to Vultr CDN Push Zones on your Vultr account using the Vultr Customer Portal, API, or CLI.

  • Vultr Customer Portal
  • Vultr API
  • Vultr CLI
  1. Navigate to Products, click CDN, and then click Push Zones.
  2. Click your target CDN Push Zone subscription to open its management page.
  3. Click Files.
  4. Click Upload File.
  5. Choose a File and provide a File Name.
  6. Click Upload File.
  7. To delete a file, click on the Delete File icon.
  8. Check the Yes, destroy this file box in the confirmation prompt, and click Delete File to permanently delete the uploaded file.
  1. Send a GET request to the List CDN Push Zones endpoint and note the target Push Zone subscription's ID.

    console
    $ curl "https://api.vultr.com/v2/cdns/push-zones" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a POST request to the Create CDN Push Zone File Upload endpoint to generate an upload endpoint for the target CDN Push Zone subscription.

    console
    $ curl "https://api.vultr.com/v2/cdns/push-zones/{pushzone-id}/files" \
        -X POST \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "name": "{filename.ext}",
            "size": {file_size_bytes}
        }'
    
  3. Send a POST request to the upload endpoint URL returned in the API response. Pass all inputs as form-data fields with the exact same keys and values. Additionally, add a field named file, which contains the file to be uploaded. This will successfully upload the file to the target CDN Push Zone subscription.

    console
    $ curl "{upload_endpoint_URL}" \
        -X POST \
        -F "acl=public-read" \
        -F "key={CDN_file_path}" \
        -F "X-Amz-Credential={X_Amz_Credential}" \
        -F "X-Amz-Algorithm={X_Amz_Algorithm}" \
        -F "X-Amz-Date={X_Amz_Date}" \
        -F "Policy={policy_string}" \
        -F "X-Amz-Signature={X_Amz_Signature}" \
        -F "file={filename.ext}"
    
  4. Send a GET request to the List CDN Push Zone Files endpoint to list all available files in the target Push Zone subscription.

    console
    $ curl "https://api.vultr.com/v2/cdns/push-zones/{pushzone-id}/files" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  5. Send a DELETE request to the Delete CDN Push Zone File endpoint to delete a file from the target Push Zone subscription.

    console
    $ curl "https://api.vultr.com/v2/cdns/push-zones/{pushzone-id}/files/{filename.ext}" \
        -X DELETE \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  1. List all available CDN Push Zone subscriptions and note the target Push Zone subscription's ID.

    console
    $ vultr-cli cdn push list
    
  2. Create a CDN Push Zone upload endpoint.

    console
    $ vultr-cli cdn push create-endpoint <pushzone-id> --name "<filename.ext>" --size <file_size_bytes>
    
    Note
    The Vultr CLI supports creating a CDN Push Zone upload endpoint. To complete the upload, use the details from the response to push the file to the target Push Zone subscription via an HTTP client like cURL or another appropriate method.
  3. List all available files in the target Push Zone subscription.

    console
    $ vultr-cli cdn push list-files <pushzone-id>
    
  4. Delete a file from the target Push Zone subscription.

    console
    $ vultr-cli cdn push delete-file <pushzone-id> <filename.ext>
    

Comments

No comments yet.