> ## Documentation Index
> Fetch the complete documentation index at: https://bunnynet-cb9733c2-onclientmiddleware.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload File

> Upload a file to a storage zone based on the URL path. If the directory tree does not exist, it will be created automatically. **The file content should be sent as the body of the request without any type of encoding.**



## OpenAPI

````yaml /api-reference/storage/openapi.json put /{storageZoneName}/{path}/{fileName}
openapi: 3.0.0
info:
  version: 1.0.0
  title: bunny.net Edge Storage API
  description: >
    ![bunny.net Logo](https://bunny.net/v2/images/bunnynet-logo-dark.png
    "bunny.net Logo")


    Learn how to use the [bunny.net](https://bunny.net "bunny.net - The content
    delivery platform that truly hops") Edge Storage API. It allows you to
    easily upload, download and delete files with just a few lines of code.

    <h2>API libraries:</h2> 

    These libraries allow quick integration for bunny.net Edge Storage.


    <ul>
      <li><a rel="nofollow" href="https://github.com/BunnyWay/BunnyCDN.PHP.Storage">BunnyCDN.PHP.Storage</a> - Official PHP storage library</li>
      <li><a rel="nofollow" href="https://github.com/BunnyWay/BunnyCDN.Net.Storage">BunnyCDN.Net.Storage</a> - Official .NET storage library</li>
      <li><a rel="nofollow" href="https://github.com/BunnyWay/BunnyCDN.Java.Storage">BunnyCDN.Java.Storage</a> - Official Java storage library</li>
      
      <li><a rel="nofollow" href="https://github.com/NiveditJain/BunnyCDNStorageLib">Python Storage Library</a> - (Unofficial)</li>
    </ul>


    <h2>Storage Endpoints:</h2> 


    The storage API endpoint depends on the primary storage region of your
    storage zone. You can also find this in the FTP & HTTP API Information of
    your storage zone.

    <ul>
      <li><strong>Falkenstein</strong>: storage.bunnycdn.com</li>
      <li><strong>New York</strong>: la.storage.bunnycdn.com</li>
      <li><strong>Los Angeles</strong>: la.storage.bunnycdn.com</li>
      <li><strong>Singapore</strong>: sg.storage.bunnycdn.com</li>
      <li><strong>Sydney</strong>: syd.storage.bunnycdn.com</li>
    </ul>
  termsOfService: http://swagger.io/terms/
  contact:
    name: bunny.net API Team
    email: support@bunny.net
    url: http://bunny.net
  license:
    name: MIT
    url: http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
servers:
  - url: https://storage.bunnycdn.com/
security:
  - AccessKeyAuthentication: []
paths:
  /{storageZoneName}/{path}/{fileName}:
    put:
      tags:
        - Manage Files
      summary: Upload File
      description: >-
        Upload a file to a storage zone based on the URL path. If the directory
        tree does not exist, it will be created automatically. **The file
        content should be sent as the body of the request without any type of
        encoding.**
      parameters:
        - name: storageZoneName
          in: path
          description: he name of your storage zone where you are connecting to.
          required: true
          schema:
            type: string
        - name: path
          in: path
          description: >-
            The directory path to where your file will be stored. If this is the
            root of your storage zone, you can ignore this parameter.
          required: true
          schema:
            type: string
        - name: fileName
          in: path
          description: The name that the file will be uploaded as.
          required: true
          schema:
            type: string
        - name: Checksum
          in: header
          required: false
          description: >-
            The SHA256 checksum of the uploaded content in HEX format
            (UPPERCASE). The server will compare the final SHA256 to the
            checksum and reject the request in case the checksums do not match.
          schema:
            type: string
          example: D7A8FBB307D7809469CA9ABCB0082E4F8D5651E46D3CDB762D02D0BF37C9E592
        - name: AccessKey
          in: header
          required: true
          description: The API AccessKey used for authentication.
          schema:
            type: string
      requestBody:
        description: >-
          Raw request body should contain the contents of the file. This should
          be raw file data without any sort of encoding.
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        '201':
          description: The file upload was successful.
        '400':
          description: Upload failed.
components:
  securitySchemes:
    AccessKeyAuthentication:
      type: apiKey
      in: header
      name: AccessKey
      description: >-
        The storage zone password also doubles as your API key. You can find it
        in your storage zone details page in the bunny.net dashboard.

````