Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend upload functionality on the FeedWriter interface #489

Open
agazso opened this issue Dec 17, 2021 · 0 comments
Open

Extend upload functionality on the FeedWriter interface #489

agazso opened this issue Dec 17, 2021 · 0 comments
Labels
kind:enhancement A net-new feature or an improvement to an existing feature type:issue

Comments

@agazso
Copy link
Member

agazso commented Dec 17, 2021

Currently there is only an upload function on the FeedWriter interface that expects a reference to be passed. This means that you are supposed to first use uploadData, uploadChunk, uploadFile or uploadFiles functions on the Bee class, then pass the returned reference to the upload function on the FeedWriter.

While this works and it gives you total control, maybe it would be more convenient to have the same functions on the FeedWriter interface directly to simplify common use-cases.

For example, this:

const feed = bee.makeFeedWriter('sequence', topic)
const ref = await bee.uploadData(postageBatchId, data)
await feed.upload(postageBatchId, ref)

Could be written instead like this:

const feed = bee.makeFeedWriter('sequence', topic)
await feed.uploadData(postageBatchId, data)
@agazso agazso added the kind:enhancement A net-new feature or an improvement to an existing feature label Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:enhancement A net-new feature or an improvement to an existing feature type:issue
Projects
None yet
Development

No branches or pull requests

1 participant