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

      Public Download

      Prod
      https://api.everabyte.io/api
      Prod
      https://api.everabyte.io/api
      GET
      https://api.everabyte.io/api
      /files/download/b5h86j5dkl7m0rnylnkt3kfh/shared
      This endpoint allows public download of a shared file without requiring an account.
      Endpoint: /files/download/{fileId}/shared
      Method: GET (Since it's a download, GET is the appropriate method)
      Path Parameters:
      fileId (required): The ID of the file to download. Example: b5h86j5dkl7m0rnylnkt3kfh
      Request Body Parameters:
      (This endpoint does not use a request body as it's a GET request)
      Example Request:
      GET /files/download/b5h86j5dkl7m0rnylnkt3kfh/shared
      This request initiates the download of the shared file with the ID b5h86j5dkl7m0rnylnkt3kfh.
      Response Codes:
      200 OK: File download successful. The file content will be in the response body.
      400 Bad Request: Invalid request parameters.
      401 Unauthorized: User is not authorized to download this file. (Important for shared files)
      404 Not Found: File not found.
      500 Internal Server Error: Server error.
      Important Considerations for Downloads:
      Content-Type Header: The response should include the appropriate Content-Type header (e.g., application/pdf, image/jpeg, application/octet-stream for generic binary data) to indicate the file's MIME type.
      Content-Disposition Header: The Content-Disposition header should be used to suggest a filename to the browser. For example: Content-Disposition: attachment; filename="downloaded_file.pdf"
      Error Handling: Clear error messages are essential, especially 401 Unauthorized to indicate access issues with shared files.

      Request

      None

      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 GET 'https://api.everabyte.io/api/files/download/b5h86j5dkl7m0rnylnkt3kfh/shared'

      Responses

      🟢200Success
      application/json
      Body
      object {0}
      Example
      {}
      Previous
      Delete
      Next
      Share file with user
      Built with