Skip to content

feat: add support for sharded CAR uploads#36

Merged
alanshaw merged 4 commits into
mainfrom
feat/add-up-car
Jan 11, 2023
Merged

feat: add support for sharded CAR uploads#36
alanshaw merged 4 commits into
mainfrom
feat/add-up-car

Conversation

@alanshaw
Copy link
Copy Markdown
Member

@alanshaw alanshaw commented Jan 11, 2023

Adds a --car flag to w3 up that allows the file to be a CAR file. If flagged, we call uploadCAR on the client, which skips the unixfs encoding but still shards and registers an upload.

Also adds a couple of parameters to control the shard size and request concurrency: --shard-size and --concurrent-requests.

Finally, this also includes a fix to filesize which ensures it avoids output like 0.0MB and also calculates correctly the value for the given units (we were dividing by 1024 not 1000 and should have been outputting MiB if that were the case).

Copy link
Copy Markdown
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool ✨

@alanshaw alanshaw merged commit b055c78 into main Jan 11, 2023
@alanshaw alanshaw deleted the feat/add-up-car branch January 11, 2023 18:15
alanshaw pushed a commit that referenced this pull request Jan 11, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](v1.0.1...v1.1.0)
(2023-01-11)


### Features

* add support for sharded CAR uploads
([#36](#36))
([b055c78](b055c78))
* adds `w3 rm <root-cid>` cmd
([#20](#20))
([899a4d4](899a4d4))


### Bug Fixes

* remove warnings using shebang
([#33](#33))
([f3a1aac](f3a1aac))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants