Micka33 / Micka33/x-api-sdk-ts
Provide helper methods for custom handling of the `Media.upload` steps
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Context
Currently, the `Media.upload` method handles all the upload steps synchronously and one chunk after another. If a chunk fails to be uploaded, the whole process fails.
There are cases where the developer might want to proceed differently, especially when the media is large, eg:
- To parallelize chunk uploads.
- To set custom retry logic when chunk upload fails.
- To use a queue to asynchronously upload each chunk of a media.
We need to expose the methods to allow these use cases.
## Todo
- [ ] Figure out which methods need to be exposed and created
- [ ] Implement / Expose required methods in `Media` class
- [ ] Update `IMedia` accordingly
- [ ] Use available Query and Response types
- [ ] Update unit tests
- [ ] Update integration tests
- [ ] Update Readme
- [ ] Add example of parallelized uploads
- [ ] Update Table of contents
Contributor guide
Research direction
Start by reading the Media class, IMedia, and the existing Query and Response types to map the current Media.upload flow. Then inspect the unit and integration tests to identify the upload contract, and update the README with the supported custom-handling usage and parallel-upload example. Done means the required methods and interface changes are implemented and all tests and documentation are updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100