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

feat: first pass at docs for the HTTP bridge #84

Merged
merged 15 commits into from
Mar 14, 2024
Merged

feat: first pass at docs for the HTTP bridge #84

merged 15 commits into from
Mar 14, 2024

Conversation

travis
Copy link
Member

@travis travis commented Mar 7, 2024

Write up basic documentation for using the HTTP bridge with popular HTTP command line tool curl, largely intended to be a guide for people implementing code that will use the bridge from another language environment.

Screenshot 2024-03-07 at 3 59 40 PM

Write up basic documentation for using the HTTP bridge with popular HTTP command line tool `curl`.

I am very close to having sharded uploads working on the command line thanks to the helpful `split` utility, but I don't think I'm
choosing the `root` CID properly - looking for pointers from reviewers!
Copy link
Contributor

github-actions bot commented Mar 8, 2024

@alanshaw
Copy link
Member

You can use https://www.npmjs.com/package/carbites-cli or https://github.com/alanshaw/go-carbites

$ ipfs-car pack ./gif -o gif.car
bafybeierz5qh6ldfekqyjsc67mtrlwkriv7rbrevmimxtk3csm2dq7tymy

$ carbites split gif.car --size 5MB

$ ls -lah
total 148280
drwxr-xr-x@ 23 alan  staff   736B 11 Mar 15:31 .
drwx------@ 26 alan  staff   832B 15 Jan 09:51 ..
...
-rw-r--r--@  1 alan  staff   5.1M 11 Mar 15:31 gif-0.car
-rw-r--r--@  1 alan  staff   5.1M 11 Mar 15:31 gif-1.car
-rw-r--r--@  1 alan  staff   5.1M 11 Mar 15:31 gif-2.car
-rw-r--r--@  1 alan  staff   5.0M 11 Mar 15:31 gif-3.car
-rw-r--r--@  1 alan  staff   3.4M 11 Mar 15:31 gif-4.car
-rw-r--r--@  1 alan  staff    24M 11 Mar 15:30 gif.car
...

$ ipfs-car blocks gif-4.car
bafkreihrkgkxf3ephtxh2uvnpe644toyjyqg7omdvgybhlelefbsaxulsy
bafkreiggytg7xwzjyuaghpxbacusfhnaryzqdtg4s3ru3gpkwnaqipajqy
bafkreihckdwu7o7sf4evpphttwarro2msiawiggfh3rrokamki3j5onsaq
bafkreibkmiuvmgahoqrieda6bf6gmaq5fzeurt2naaxpscktzo3fob3pmy
bafkreidsj465qf7weg6wh4mxa6ojs24nkp3gh6w564aavkdoegw4lpthlm
bafybeifvf4imqksp7d5tkbf6hsxx7bg5kexbpdojfrl7ibrpi3mzaws3b4
bafkreigg4a4z7o5m5pwzcfyphodsbbdp5sdiu5bwibdw5wvq5t24qswula
bafkreigh2akiscaildcqabsyg3dfr6chu3fgpregiymsck7e7aqa4s52zy
bafkreiev7xx6gdmb6xb2vz5nmnf3qikqlfyopg6o7fdweozc2ptkvsiuyi
bafkreih32t2mmj744kskelq3caqkuz3ynbughxbs4f4nesrqblrciws5vi
bafkreibqgrlsa67xyw2ce5nkmczs243s544giqkkjwgxwrndnpoodztd2m
bafkreiegrssaqz73ak27vuxkqvbga7nfzahmrn4abnzr4lu5mmmaegvqsa
bafkreibhf6nq7mwpqy45xykosnuznxkjwi5l7zxwmg5tqxp3erydnskipq
bafybeib35xfjspdbnb7rl4bfgdz63njpdscusxt5cv6j7ii263hwyknfh4
bafkreiem4twkqzsq2aj4shbycd4yvoj2cx72vezicletlhi7dijjciqpui
bafkreif4oucg3jxizkvdb7l5hzpjbqbhqczgxxrsgqx2l3jjphaop2xj5a
bafkreic3mfort4jygoakbg65oxtllrbadnq6zevuohyardulvqrdgsgpae
bafkreib6qnkqnblskwb3tkiznhr7ufy6gimh4zre2nzdnlijwulsemcuge
bafkreie2t4awrf44l3xi3xvnyq2cyx27ixharrvpfgfuca3s2qy3kcvjo4
bafybeig2af246ihsv76mvmimxpvb5adyt7kpez2wa52cevqohpvi5ev4hi
bafybeierz5qh6ldfekqyjsc67mtrlwkriv7rbrevmimxtk3csm2dq7tymy

src/pages/docs/how-to/http-bridge.mdx Outdated Show resolved Hide resolved
src/pages/docs/how-to/http-bridge.mdx Show resolved Hide resolved
src/pages/docs/how-to/http-bridge.mdx Outdated Show resolved Hide resolved
src/pages/docs/how-to/http-bridge.mdx Outdated Show resolved Hide resolved
src/pages/docs/how-to/http-bridge.mdx Outdated Show resolved Hide resolved
src/pages/docs/how-to/http-bridge.mdx Show resolved Hide resolved
@travis
Copy link
Member Author

travis commented Mar 11, 2024

Awesome - thanks for the feedback @alanshaw ! I've incorporated your suggestions and added a section that demonstrates how to use carbites to split a large file - saw it working this morning, very cool!

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

This LGTM, but I'd probably use a bigger file in the sharding example to make it clearer. Also commented with some minor tweaks and typos you might want to use.

🚀 thanks for this, it's awesome!

src/pages/docs/how-to/http-bridge.mdx Outdated Show resolved Hide resolved
src/pages/docs/how-to/http-bridge.mdx Outdated Show resolved Hide resolved
src/pages/docs/how-to/http-bridge.mdx Outdated Show resolved Hide resolved
src/pages/docs/how-to/http-bridge.mdx Outdated Show resolved Hide resolved
travis and others added 3 commits March 14, 2024 10:00
@travis travis merged commit 1d6a487 into main Mar 14, 2024
3 checks passed
@travis travis deleted the feat/bridge-docs branch March 14, 2024 18:20
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