How to Upload Files to Vultr CDN Push Zones

Updated on September 25, 2024

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.

    Pushzone option in products sidebar

  2. Click your target CDN Push Zone service.

    Selection of a target Push Zone service

  3. Click Files.

    Button to view the CDN files

  4. Click Upload Files.

    Button to open the upload file dialog file

  5. Choose a file.

  6. Provide a file name.

  7. Click Upload File.

    Button to upload the CDN file

  8. To delete a file, click on the Delete File icon.

    Button to open the delete file dialog box

  9. Click Delete File on the confirmation prompt.

  1. Send a GET request to the List Push Zones endpoint and note the target Push Zone service'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 Push Zone Upload to create an upload endpoint.

    console
    $ curl "https://api.vultr.com/v2/cdns/push-zones/e0b2d7c5-28de-41bd-a370-cffd09d9dd16/files" \
        -X POST \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        -d '{
            "name": "example-file.txt",
            "size": 1024
        }'
    
  3. Send a GET request to the Push Zone files to list all available files on the target Push Zone service.

    console
    $ curl "https://api.vultr.com/v2/cdns/push-zones/<pushzone-id>/files" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  4. Send a DELETE request to the Push Zone file to delete a Push Zone file on the Push Zone service.

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

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

    console
    $ vultr-cli cdn push create-endpoint <pushzone-id> --name text.txt --size 1024
    
  3. List all available files in the target Push Zone service.

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

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