Everabyte API
    Everabyte API
    • Back to home
    • File
    • List
      GET
    • Detail
      GET
    • Upload
      PUT
    • Update
      PUT
    • Download
      GET
    • Delete
      DELETE
    • Public Download
      GET
    • Share file with user
      PUT

      Upload

      Prod
      https://api.everabyte.io/api
      Prod
      https://api.everabyte.io/api
      PUT
      https://api.everabyte.io/api
      /files/upload/c0awv0oseisvm83lru953k12/rxkg5t3aowbns42ma6ek0jn1
      This endpoint is used to upload one or multiple files to a specified bucket and optionally a folder within that bucket.
      Endpoint: /files/upload/{bucketId}/{folderId}
      Method: PUT
      Path Parameters:
      bucketId (required): The ID of the bucket to which the files will be uploaded. Example: my-bucket-123
      folderId (optional): The ID of the folder within the bucket to which the files will be uploaded. If not provided, the files are uploaded to the root of the bucket. Example: my-folder-456
      Request Body:
      The request body should be multipart/form-data. Each file to be uploaded should be sent as a separate part with the name file.
      Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
      Example of a multipart/form-data request body (simplified):
      ------WebKitFormBoundary7MA4YWxkTrZu0gW
      Content-Disposition: form-data; name="file"; filename="document1.pdf"
      Content-Type: application/pdf
      
      [File content of document1.pdf]
      ------WebKitFormBoundary7MA4YWxkTrZu0gW
      Content-Disposition: form-data; name="file"; filename="image1.jpg"
      Content-Type: image/jpeg
      
      [File content of image1.jpg]
      ------WebKitFormBoundary7MA4YWxkTrZu0gW--
      Example Request (using curl):
      Uploading a single file:
      Uploading multiple files:
      Explanation of the curl examples:
      -X PUT: Specifies the HTTP method as PUT.
      -F "file=@document1.pdf": Specifies a form field named "file" and uploads the contents of the local file document1.pdf. The @ symbol tells curl to treat the following string as a filename.
      The second example includes /my-folder-456 in the URL to specify the folder.
      Multiple -F "file=@..." options are used to upload multiple files.
      Response Codes:
      200 OK: Files successfully uploaded.
      201 Created: Files successfully created (may be used if the bucket/folder was created as a result of the upload).
      400 Bad Request: Invalid request parameters (e.g., missing bucket ID, no files provided).
      404 Not Found: Bucket not found.
      500 Internal Server Error: Server error.

      Request

      Authorization
      Provide your bearer token in the
      Authorization
      header when making requests to protected resources.
      Example:
      Authorization: Bearer ********************
      Body Params multipart/form-data
      file
      file 
      required
      Example:
      []

      Request samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request PUT 'https://api.everabyte.io/api/files/upload/c0awv0oseisvm83lru953k12/rxkg5t3aowbns42ma6ek0jn1'

      Responses

      🟢200Upload
      text/plain
      Body
      status
      integer 
      required
      message
      string 
      required
      data
      string 
      required
      Example
      {
        "status": 200,
        "message": "File uploaded successfully.",
        "data": ""
      }
      Previous
      Detail
      Next
      Update
      Built with