ObjectStorage
ObjectStorage class for interacting with object storage services.
Param
The configuration for the object storage service.
Constructors
new ObjectStorage()
new ObjectStorage(config: ObjectStorageConfig): ObjectStorageParameters:
configObjectStorageConfig
Returns:
ObjectStorage
Methods
upload()
upload( path: string, organizationId: string,archiveBasePath: string): Promise<string>Upload a file or directory to object storage.
Parameters:
pathstring - The path to the file or directory to upload.organizationIdstring - The organization ID to use for the upload.archiveBasePathstring - 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:
accessKeyIdstring - The access key ID for the object storage service.bucketName?string - The name of the bucket to use.endpointUrlstring - The endpoint URL for the object storage service.secretAccessKeystring - The secret access key for the object storage service.sessionToken?string - The session token for the object storage service. Used for temporary credentials.