AdministrationData ManagementObject

Create an object

Upload an object on the Console, with rc, or with the S3 API.

An object is the data RustFS stores under a key, along with its metadata. This guide shows how to upload one.

Requirements

  • A running RustFS instance (see Installation Guide).
  • rc installed and configured with an alias for the command-line workflow.
  • A target bucket. Create one by following Create a bucket.

Create an object

Use the RustFS Console

  1. Sign in to the RustFS Console.
  2. Select the target bucket.
  3. On the bucket page, in the top right corner, select New Directory, New File, or Upload File/Folder.
  4. To upload from your local machine, click Upload File/Folder, select the files, and click Start Upload.

object creation from ui

Select an object to view its details.

object details info

Using rc

See the rc guide for installation and alias configuration.

Upload a file:

rc object copy /path/to/hello.txt rustfs/my-bucket/hello.txt
rc object list rustfs/my-bucket

Verify the upload in the RustFS Console.

Using the API

Upload a file via API:

PUT /{bucketName}/{objectName} HTTP/1.1

S3 requests must be signed with AWS Signature V4, so use an S3 client rather than hand-crafting headers. With the AWS CLI configured for your access keys:

aws s3api put-object \
  --bucket bucket-creation-by-api \
  --key hello.txt \
  --body /path/to/hello.txt \
  --endpoint-url http://localhost:9000

Verify the upload in the RustFS Console.

Delete an object

See Delete an object.

To delete an object with the S3 API, use:

DELETE /{bucketName}/{objectName} HTTP/1.1

Request example:

aws s3api delete-object \
  --bucket bucket-creation-by-api \
  --key hello.txt \
  --endpoint-url http://localhost:9000

Confirm in the RustFS Console that the object no longer appears.

On this page