StaticcreateCreate a new Storage Object. This method returns a StorageObject instance that you can use to upload content.
You should use the uploadFromFile() or uploadFromBuffer() methods to upload content and handle the complete process for you. If you need more control, you can use the uploadContent() method.
To upload content:
The Runloop client instance
Parameters for creating the object
Optionaloptions: RequestOptions<unknown>Request options
A StorageObject instance with upload URL
StaticlistList all storage objects with optional filters.
The Runloop client instance
Optionalparams: ObjectListParamsOptional filter parameters
Optionaloptions: RequestOptions<unknown>Request options
Array of StorageObject instances
StaticuploadOptionaloptions: RequestOptions<unknown> & {Optionalignore?: string[] | IgnoreMatcherOptional ignore configuration for the directory:
OptionaldockerignorePath?: stringOptional path to a specific .dockerignore-style file to use instead of
the default <dirPath>/.dockerignore.
Get the complete object data from the API.
Optionaloptions: RequestOptions<unknown>Request options
The object data
Upload content to the storage object using the presigned URL. This is a convenience method that handles the HTTP PUT request.
Note: For large files or binary content, you may want to use the uploadUrl directly with your own upload logic.
When this is done call complete() to mark the upload as complete.
The content to upload (string or Buffer)
Promise that resolves when upload is complete
Mark the object's upload as complete, transitioning it from UPLOADING to READ_ONLY state. Call this after you've finished uploading content via the upload URL.
Optionaloptions: RequestOptions<unknown>Request options
Promise that resolves when the upload is marked as complete
Get a presigned download URL for this object. The URL will be valid for the specified duration (default: 1 hour).
OptionaldurationSeconds: numberHow long the URL should be valid (default: 3600)
Optionaloptions: RequestOptions<unknown>Request options
Download URL information
Download the content of this object as text. This is a convenience method that fetches the download URL and retrieves the content.
Optionaloptions: RequestOptions<unknown>Request options
The object content as a string
Download the content of this object as a Buffer. This is a convenience method that fetches the download URL and retrieves the content.
Optionaloptions: RequestOptions<unknown>Request options
The object content as a Buffer
Delete this object. This action is irreversible.
Optionaloptions: RequestOptions<unknown>Request options
Promise that resolves when the object is deleted
Object-oriented interface for working with Storage Objects.
Remarks
Overview
The
StorageObjectclass provides a high-level API for managing storage objects, which are files stored in Runloop's object storage. Storage objects can be uploaded, downloaded, and managed with metadata.Quickstart