Sign Up

ObjectStorage

ObjectStorage class for interacting with object storage services.

Param

config

The configuration for the object storage service.

Constructors

Constructor

new ObjectStorage(config: ObjectStorageConfig): ObjectStorage;

Parameters:

  • config ObjectStorageConfig

Returns:

  • ObjectStorage

Methods

upload()

upload(
   path: string, 
   organizationId: string, 
archiveBasePath: string): Promise<string>;

Upload a file or directory to object storage.

Parameters:

  • path string - The path to the file or directory to upload.
  • organizationId string - The organization ID to use for the upload.
  • archiveBasePath string - The base path to use for the archive.

Returns:

  • Promise<string> - The hash of the uploaded file or directory.

ObjectStorageConfig

Configuration for the ObjectStorage class.

Properties:

  • accessKeyId string - The access key ID for the object storage service.
  • bucketName? string - The name of the bucket to use.
  • endpointUrl string - The endpoint URL for the object storage service.
  • region string - The region of the storage backend.
  • secretAccessKey string - The secret access key for the object storage service.
  • sessionToken? string - The session token for the object storage service. Used for temporary credentials.