-
Notifications
You must be signed in to change notification settings - Fork 64
file
Alena edited this page Dec 28, 2023
·
6 revisions
Files repository is a general purpose file storage which provides API for upload and download: PUT
requests for upload and GET
for download.
To set up this repository, create config with file
repository type and storage configuration.
Example:
repo:
type: file
storage:
type: fs
path: /var/artipie/data
In order to upload a binary file to the storage, send a PUT
HTTP request with file contents:
echo "hello world" > test.txt
curl -X PUT --data-binary "@test.txt" http://{host}:{port}/{repository-name}/test.txt
In order to download a file, send a GET
HTTP request:
curl -X GET http://{host}:{port}/{repository-name}/text.txt
In the examples above {host}
and {port}
are Artipie service host and port, {repository-name}
is the name of files repository.