sal/rfs-client/openapi/docs/FileManagementApi.md
2025-06-24 16:10:39 +03:00

2.2 KiB

\FileManagementApi

All URIs are relative to http://localhost

Method HTTP request Description
get_file_handler GET /api/v1/file/{hash} Retrieve a file by its hash from path, with optional custom filename in request body.
upload_file_handler POST /api/v1/file Upload a file to the server.

get_file_handler

std::path::PathBuf get_file_handler(hash, file_download_request) Retrieve a file by its hash from path, with optional custom filename in request body.

The file will be reconstructed from its blocks.

Parameters

Name Type Description Required Notes
hash String File hash [required]
file_download_request FileDownloadRequest Optional custom filename for download [required]

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/octet-stream, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

upload_file_handler

models::FileUploadResponse upload_file_handler(body) Upload a file to the server.

The file will be split into blocks and stored in the database.

Parameters

Name Type Description Required Notes
body std::path::PathBuf File data to upload [required]

Return type

models::FileUploadResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/octet-stream
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]