{"id":13604808,"url":"https://github.com/web3-storage/web3.storage","last_synced_at":"2025-04-13T03:59:43.904Z","repository":{"id":36958539,"uuid":"378893240","full_name":"web3-storage/web3.storage","owner":"web3-storage","description":"DEPRECATED ⁂ The simple file storage service for IPFS \u0026 Filecoin","archived":false,"fork":false,"pushed_at":"2025-02-14T20:25:26.000Z","size":149310,"stargazers_count":506,"open_issues_count":213,"forks_count":119,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-04-13T03:59:24.878Z","etag":null,"topics":["fil","filecoin","filestorage","ipfs","libp2p","p2p","storage"],"latest_commit_sha":null,"homepage":"https://web3.storage","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web3-storage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-21T10:30:33.000Z","updated_at":"2025-04-12T17:47:54.000Z","dependencies_parsed_at":"2023-02-19T09:46:29.921Z","dependency_job_id":"084ec73e-46f9-4df1-b7c6-6ffeb1658a60","html_url":"https://github.com/web3-storage/web3.storage","commit_stats":{"total_commits":1352,"total_committers":62,"mean_commits":"21.806451612903224","dds":0.7655325443786982,"last_synced_commit":"2536110f0eb722fc6f09069e706f2638e7eed0f4"},"previous_names":[],"tags_count":320,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fweb3.storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fweb3.storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fweb3.storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fweb3.storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3-storage","download_url":"https://codeload.github.com/web3-storage/web3.storage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661706,"owners_count":21141450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fil","filecoin","filestorage","ipfs","libp2p","p2p","storage"],"created_at":"2024-08-01T19:00:51.490Z","updated_at":"2025-04-13T03:59:43.878Z","avatar_url":"https://github.com/web3-storage.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003e ⚠️ **DEPRECATED** This repo will be archived on January 9, 2024 as this web3.storage API will no longer take new uploads. Please use the [new client and API](https://github.com/web3-storage/w3up/tree/main/packages/w3up-client) for future usage of web3.storage. Documentation for the new client can be found [here](https://web3.storage/docs). You can learn more about these changes [here](https://blog.web3.storage/posts/the-data-layer-is-here-with-the-new-web3-storage).\n\n\u003ch1 align=\"center\"\u003e\u003ca href=\"https://web3.storage\"\u003e\u003cimg width=\"25%\" src=\"https://user-images.githubusercontent.com/11778450/227262707-1a9674a7-9286-43e3-87b4-98b388677720.png\" alt=\"web3.storage logo\" /\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003eThe simple file storage service for IPFS \u0026amp; Filecoin.\u003c/p\u003e\n\n## Usage\n\nStore your files with web3.storage and retrieve them via their unique Content ID. Our tools make it simple to hash your content locally, so you can verify the service only ever stores the exact bytes you asked us to. Pick the method of using with web3.storage that works for you!\n\n\n### Website\n\nCreate an account via https://web3.storage and upload right from the website using our uploader. Under the hood it uses the web3.storage client that we publish to npm to chunk and hash your files to calculate the root IPFS CID **in your browser** before sending them to https://api.web3.storage.\n\nOnce uploaded you can fetch your data from any IPFS gateway via [`https://dweb.link/ipfs/\u003croot cid\u003e`](https://dweb.link/ipfs/bafkreigh2akiscaildcqabsyg3dfr6chu3fgpregiymsck7e7aqa4s52zy)\n\nCreate an api token for your account and you can use any of the following alternatives to upload your data.\n\n\n### JS Client\n\nUse npm to install the [`web3.storage`](https://www.npmjs.com/package/web3.storage) module into your JS project, create an instance of the client with your api token, and use the `.put` method to upload your files in node.js or the browser.\n \n**node.js**\n```js\nconst { Web3Storage, getFilesFromPath } = require('web3.storage')\nconst storage = new Web3Storage({ token: process.env.WEB3_TOKEN })\nconst files = await getFilesFromPath(process.env.PATH_TO_ADD)\nconst cid = await storage.put(files)\nconsole.log(`IPFS CID: ${cid}`)\nconsole.log(`Gateway URL: https://dweb.link/ipfs/${cid}`)\n```\n\nSee https://web3.storage/docs/#quickstart for a guide to using the js client for the first time.\n  \n\n### CLI\n\nOur command line tool `w3` is a wrapper around the JS Client to make adding files from your terminal as simple as `w3 put ~/gifs`.\n\nInstall [`@web3-storage/w3`](https://www.npmjs.com/package/@web3-storage/w3) globally and save your api token then add your files to web3! It calculates the root CID for your files locally before sending them to web3.storage.\n\n**shell**\n```console\n$ w3 token\n? Paste your API token for api.web3.storage › \u003cyour api token here\u003e\n⁂ API token saved\n\n$ w3 put ~/Pictures/ayy-lamo.jpg\n⁂ Stored 1 file\n⁂ https://dweb.link/ipfs/bafybeid6gpbsqkpfrsx6b6ywrt24je4xqe4eo4y2wldisl6sk7byny5uky\n```\n\nUse it anywhere you can get a shell. Get creative! For example, we use this for performance testing the [upload speed in CI](https://github.com/web3-storage/web3.storage/blob/9fafc830b841da0dd6bd5319c77febaded232240/.github/workflows/cron-test.yml#L36)!\n\nRun `w3 --help` or have a look at https://github.com/web3-storage/web3.storage/tree/main/packages/w3#readme to find out everything it can do.\n\n\n### GitHub Action \n\nThe Action [`add_to_web3`](https://github.com/marketplace/actions/add-to-web3) wraps the `w3` CLI to let you add files to web3.storage from your GitHub Workflows.\n\n**github-workflow.yaml**\n```yaml\n- run: npm run build # e.g output your static site to `./dist`\n\n- uses: web3-storage/add-to-web3@v2\n  id: web3\n  with:\n    web3_token: ${{ secrets.WEB3_STORAGE_TOKEN }}\n    path_to_add: 'dist'\n\n- run: echo ${{ steps.web3.outputs.cid }}\n# \"bafkreicysg23kiwv34eg2d7qweipxwosdo2py4ldv42nbauguluen5v6am\"\n- run: echo ${{ steps.web3.outputs.url }}\n# \"https://dweb.link/ipfs/bafkreicysg23kiwv34eg2d7qweipxwosdo2py4ldv42nbauguluen5v6am\"\n```\n\nSet your api token and the `path_to_add` and watch it fly! We use `add_to_web3` to add the [web3.storage website to web3.storage](https://github.com/web3-storage/web3.storage/blob/c0227a0b927fedd324287ad6ef95db857c205939/.github/workflows/website.yml#L158-L165) from CI ∞!\n\n\n### cURL\n\nWant to try it out? You can POST a file smaller than 100MB straight to https://api.web3.storage/upload with `cURL`.\n\n```console\ncurl -X POST --data-binary @file.txt -H 'Authorization: Bearer YOUR_API_KEY' https://api.web3.storage/upload  -s | jq\n{\n  \"cid\":\"bafkreid65ervf7fmfnbhyr2uqiqipufowox4tgkrw4n5cxgeyls4mha3ma\"\n}\n```\n\n**See https://web3.storage/docs/ for our complete documentation 📖🔍**\n\n\n## Building web3.storage\n\nWant to help us improve web3.storage? Great! This project uses node v16 and npm v7. It's a monorepo that use [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces) to handle resolving dependencies between the local `packages/*` folders.\n\nYou need an account on https://magic.link, and Docker running locally.\n\nCopy the \u003c.env.tpl\u003e file to `.env` and set the values for the `MAGIC_SECRET_KEY` \u0026 `NEXT_PUBLIC_MAGIC`, from your magic.link account dashboard.\n\nInstall the deps with `npm`\n\n```console\n# install deps\nnpm install\n```\n\nRun all the things with `npm start`. Double check you have Docker running first.\n\n```console\n# start the api and website\nnpm start\n```\n\nIf it's your first run you need to [create the database schema](./packages/db/README.md).\n\n```console\n# init the db. Run me once after `npm start`, on first set up.\nnpm run load-schema -w packages/db\n```\n\n## Monorepo\n\nThis project is a monorepo that uses [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces).\n\nAll `npm` commands should be run from the root of the repo. To run a command for a specific package add the `--workspace` or `-w` flag\n\n```console\n# Start just the api\nnpm start -w packages/api\n```\n\nTo add a new workspace (aka package) to the monorepo\n\n```console\n# adds the path to the `website` package to the `workspaces` property in package.json\nnpm init -w packages/website\n```\n\nTo run an npm script in one or more workspaces\n\n```console\n# run test command in package `a` and `b`\nnpm run test --workspace=packages/a --workspace=packages/b\n```\n\n## Testing\n\nEach workspace has its own suite of testing tools, which you can learn more about in the relevant `packages/*` directory. Check out highlights in each readme using the links below, then dig into the relevant `package.json` file for a full list of available scripts. \n- [Website](https://github.com/web3-storage/web3.storage/tree/main/packages/website#readme) (packages/website)\n- [JavaScript API client](https://github.com/web3-storage/web3.storage/tree/main/packages/client#readme) (packages/client)\n- [HTTP API client](https://github.com/web3-storage/web3.storage/tree/main/packages/api#readme) (packages/api)\n- [CLI](https://github.com/web3-storage/web3.storage/tree/main/packages/w3#readme) (packages/w3)\n- [Cron jobs](https://github.com/web3-storage/web3.storage/tree/main/packages/cron#readme) (packages/cron)\n- [Database](https://github.com/web3-storage/web3.storage/tree/main/packages/db#readme) (packages/db)\n\nOur docs website is currently hosted in a [separate repo](https://github.com/web3-storage/docs), but you can test it too!\n\n## Learn more\n\nTo learn more about the web3.storage service, upload a file through our friendly UI, or find detailed documentation for the JS client library, please head over to https://web3.storage\n\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://web3.storage\"\u003e⁂\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fweb3.storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3-storage%2Fweb3.storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fweb3.storage/lists"}