Skip to main content

Reading

The ConfectStorageReader service is used to retrieve the URLs of blobs in storage.
Effect.gen(function* () {
  const reader = yield* ConfectStorageReader;

  return yield* reader.getUrl(storageId);
});

Writing in mutations

The ConfectStorageWriter service is used to write blobs to storage in mutations.
Effect.gen(function* () {
  const storage = yield* ConfectStorageWriter;

  // ...
});

Methods

Generate an upload URL

storage.generateUploadUrl();

Delete a blob

storage.delete(storageId);

Writing in actions

The ConfectStorageActionWriter service is used to write blobs to storage in actions.
Effect.gen(function* () {
  const storage = yield* ConfectStorageActionWriter;

  return yield* storage.get(storageId);
});