{"id":13929184,"url":"https://github.com/BBaoVanC/bobashare","last_synced_at":"2025-07-19T11:31:00.767Z","repository":{"id":58088534,"uuid":"529484352","full_name":"BBaoVanC/bobashare","owner":"BBaoVanC","description":"Simple fast, anonymous, ephemeral file sharing service","archived":false,"fork":false,"pushed_at":"2025-03-09T07:14:09.000Z","size":38653,"stargazers_count":20,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T22:14:45.801Z","etag":null,"topics":["file-sharing","file-upload","paste","pastebin","pastebin-service","rust-lang","upload"],"latest_commit_sha":null,"homepage":"https://share.boba.best","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BBaoVanC.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-27T04:48:44.000Z","updated_at":"2025-03-20T10:19:33.000Z","dependencies_parsed_at":"2023-02-17T14:00:47.238Z","dependency_job_id":"bf6b5e8d-5c7f-421e-b0ac-6f577c700a4f","html_url":"https://github.com/BBaoVanC/bobashare","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/BBaoVanC/bobashare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBaoVanC%2Fbobashare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBaoVanC%2Fbobashare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBaoVanC%2Fbobashare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBaoVanC%2Fbobashare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BBaoVanC","download_url":"https://codeload.github.com/BBaoVanC/bobashare/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBaoVanC%2Fbobashare/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265926920,"owners_count":23850886,"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":["file-sharing","file-upload","paste","pastebin","pastebin-service","rust-lang","upload"],"created_at":"2024-08-07T18:02:10.153Z","updated_at":"2025-07-19T11:31:00.760Z","avatar_url":"https://github.com/BBaoVanC.png","language":"Rust","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# bobashare\n\nA simple, fast, and anonymous file sharing server.\n\n## Usage (client-side)\n\nThere are currently a couple of clients for simple usage of the bobashare API,\nnamely uploading files:\n\n- [`bobashareupload`](https://github.com/shepgoba/bobashareupload)\n- [`bobash`](https://github.com/kkrruumm/bobash)\n\nOtherwise, see the [API docs](#api).\n\n## Architecture\n\nThis program is separated into three different crates. `bobashare` is the\nbackend logic and platform API, and `bobashare-web` provides a webserver\ninterface between the `bobashare` backend. And `bobashare-admin` is currently an\nabandoned alternative interface which uses a CLI to edit the storage instead.\n\n## Setup (server-side)\n\n*This section is for running your own bobashare server. If you just want to\nupload files to an existing instance, see the [Usage\n(client-side)](#usage-client-side) section.*\n\nI designed bobashare to be as simple and clean to run as possible. You can\nsimply run the corresponding `bobashare-web` executable for your platform,\navailable under [Releases](https://github.com/BBaoVanC/bobashare/releases).\n\n**Make sure not to accidentally download a `bobashare-admin` executable as it is\njust a CLI for interacting with the backend database. It won't run the server.**\n\nbobashare will create the configured storage directory if it doesn't exist and\nlisten on the configured address/port. No files on the system are touched\noutside of the storage directory.\n\nHowever, do note that I don't have premade systemd unit service files yet\n(although writing one will be trivial with how simple it is to run\n`bobashare-web`) so running it as a service may currently be easiest using\nDocker (and compose).\n\n### Docker\n\nThe image is `ghcr.io/bbaovanc/bobashare:latest`. You can copy an example\n`compose.yaml` from [compose.example.yaml](compose.example.yaml), just delete\nthe `build:` line and uncomment the `image:` line.\n\n## Configuration\n\n`bobashare-web` accepts configuration via [TOML file](bobashare-web/bobashare.example.toml)\nand/or environment variables (with env vars taking priority). The environment\nvariables are the regular names, but in all caps and with the prefix `APP_` (so\n`base_url` would become `APP_BASE_URL`).\n\nIf using a config file, you must specify the path of it using the\n`--config`/`-c` flag.\n\nList of config options:\n\n- `listen_addr` - default `127.0.0.1:3000` - the address and port to listen on\n- `backend_path` - default `storage/` (relative to current directory) - the\n  directory to use for storing all bobashare data (uploads and metadata)\n- `cleanup_interval` - default `1h` - how often to run a cleanup task, where e\n  loop through every upload in the store to delete expired ones\n- `base_url` - default `http://localhost:3000/` - the url that the bobashare\n  instance is being hosted on, used for generating upload URLs and CSS/JS paths\n- `id_length` - default `8` - how many characters should each upload id be\n- `default_expiry` - default `24h` - the default expiry time for new uploads,\n  used as the default option in the UI, and if not explicitly chosen by API\n  request\n- `max_expiry` - default `30d` - the maximum expiry of an upload, can be set to\n  `never` to allow non-expiring uploads\n- `max_file_size` - default `1073741824` (1 GiB) - maximum size of an upload\n- `extra_footer_text` - default empty - extra text to add to the footer, see the\n  \"Limits\" blurb at the bottom on https://share.boba.best\n- `about_page` - default empty - path to a markdown file to render on the about\n  page at `/about/`\n\nAlso see the `--help` page for different verbosity settings.\n\n## Rustdoc (internal code docs)\n\n- [bobashare](https://bbaovanc.github.io/bobashare/bobashare/index.html)\n- [bobashare-web](https://bbaovanc.github.io/bobashare/bobashare_web/index.html)\n\n## API\n\n### `/api/v1/`\n\n#### GET `info/:id`\n\nGet information (metadata) about an upload\n\n**Request:** `GET /api/v1/info/:id`\n\n**Arguments:**\n\n- `:id` - the ID of the upload to query\n\n**Successful response:** 200 OK, with JSON body in [InfoResponse][inforesponse-struct] format\n\n**Example:**\n\n```bashsession\n$ curl https://share.example.com/api/v1/info/dXk1ODH5 | python -m json.tool\n{\n    \"id\": \"dXk1ODH5\",\n    \"url\": \"https://share.example.com/dXk1ODH5\",\n    \"direct_url\": \"https://share.example.com/raw/dXk1ODH5\",\n    \"filename\": \"20230526_170432.jpg\",\n    \"mimetype\": \"image/jpeg\",\n    \"creation_date\": \"2023-10-14T03:26:06.961405419Z\",\n    \"expiry_date\": \"2023-10-15T03:26:06.961405419Z\"\n}\n```\n\n---\n\n#### PUT `upload/:filename`\n\nCreate an upload\n\n**Request:** `PUT /api/v1/upload/:filename`\n\n**Arguments:**\n\n- `:filename` - the name of the file being uploaded (required)\n\n**Request headers:**\n\n- `Content-Type` **(required)** - the mime type (file format) of the file. Note that\n  it will be ignored if the file is found to be UTF-8 plaintext.\n- `Bobashare-Expiry` *(optional)* - duration until the upload should expire\n  - specify `0` for no expiry\n  - examples (see\n    [`duration_str`](https://docs.rs/duration-str/latest/duration_str/) for more information):\n    - `1d` -- 1 day\n    - `1h` -- 1 hour\n    - `1m` -- 1 minute\n    - `1s` -- 1 second\n- `Bobashare-Delete-Key` *(optional)* - custom key to use for deleting the file\n  later; if not provided, one will be randomly generated\n\n**Request body:** The contents of the file\n\n**Successful response:**\n\n- 201 Created\n- `Location` header with the URL of the upload\n- JSON body [UploadResponse][uploadresponse-struct]\n\n**Example:**\n\nPlease note that in this example, the trailing slash on the URL, combined with\nusing the `-T` flag means that curl automatically adds the filename to the end\nof the URL. To the server, it appears as a `PUT\n/api/v1/upload/joel-holland-TRhGEGdw-YY-unsplash.jpg`.\n\n```bashsession\n$ file --mime-type joel-holland-TRhGEGdw-YY-unsplash.jpg\njoel-holland-TRhGEGdw-YY-unsplash.jpg: image/jpeg\n$ curl -H 'Content-Type: image/jpeg' -T joel-holland-TRhGEGdw-YY-unsplash.jpg https://share.example.com/api/v1/upload/ | python -m json.tool\n{\n    \"id\": \"ireyFMwu\",\n    \"url\": \"https://share.example.com/ireyFMwu\",\n    \"direct_url\": \"https://share.example.com/raw/ireyFMwu\",\n    \"filename\": \"joel-holland-TRhGEGdw-YY-unsplash.jpg\",\n    \"mimetype\": \"image/jpeg\",\n    \"expiry_date\": \"2023-10-15T05:11:37.486763335Z\",\n    \"delete_key\": \"joNtQd7TVKdBvlOmocueM35qU3JOqFuc\"\n}\n```\n\n---\n\n#### DELETE `delete/:id`\n\nDelete an upload\n\n**Request:** `DELETE /api/v1/delete/:id`\n\n**Arguments:**\n\n- `:id` - the ID of the upload to delete\n\n**Request body:** Should contain the `delete_key`, which was given in\n[UploadResponse][uploadresponse-struct] when creating the upload.\n\n**Successful response:** 204 No Content\n\n**Example:**\n\n```bashsession\n$ curl -X DELETE https://share.example.com/api/v1/delete/ireyFMwu -d 'joNtQd7TVKdBvlOmocueM35qU3JOqFuc'\n```\n\n\n[inforesponse-struct]: https://bbaovanc.github.io/bobashare/bobashare_web/api/v1/info/struct.InfoResponse.html\n[uploadresponse-struct]: https://bbaovanc.github.io/bobashare/bobashare_web/api/v1/upload/struct.UploadResponse.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBBaoVanC%2Fbobashare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBBaoVanC%2Fbobashare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBBaoVanC%2Fbobashare/lists"}