{"id":17145956,"url":"https://github.com/foxcpp/filedrop","last_synced_at":"2025-04-13T11:22:03.219Z","repository":{"id":45565827,"uuid":"152657692","full_name":"foxcpp/filedrop","owner":"foxcpp","description":"Tiny file storage server with HTTP API","archived":false,"fork":false,"pushed_at":"2020-03-06T02:40:34.000Z","size":59,"stargazers_count":12,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T02:38:28.882Z","etag":null,"topics":["file-upload-server","http-service"],"latest_commit_sha":null,"homepage":"","language":"Go","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/foxcpp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-11T21:24:05.000Z","updated_at":"2025-02-11T05:49:46.000Z","dependencies_parsed_at":"2022-08-28T07:12:00.993Z","dependency_job_id":null,"html_url":"https://github.com/foxcpp/filedrop","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcpp%2Ffiledrop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcpp%2Ffiledrop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcpp%2Ffiledrop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcpp%2Ffiledrop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxcpp","download_url":"https://codeload.github.com/foxcpp/filedrop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703744,"owners_count":21148224,"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-upload-server","http-service"],"created_at":"2024-10-14T21:07:21.924Z","updated_at":"2025-04-13T11:22:03.158Z","avatar_url":"https://github.com/foxcpp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"filedrop\n==========\n\n[![Travis CI](https://img.shields.io/travis/com/foxcpp/filedrop.svg?style=flat-square\u0026logo=Linux)](https://travis-ci.com/foxcpp/filedrop)\n[![CodeCov](https://img.shields.io/codecov/c/github/foxcpp/filedrop.svg?style=flat-square)](https://codecov.io/gh/foxcpp/filedrop)\n[![Issues](https://img.shields.io/github/issues-raw/foxcpp/filedrop.svg?style=flat-square)](https://github.com/foxcpp/filedrop/issues)\n[![License](https://img.shields.io/github/license/foxcpp/filedrop.svg?style=flat-square)](https://github.com/foxcpp/filedrop/blob/master/LICENSE)\n\nLightweight file storage server with HTTP API.\n\n### Features\n- Painless configuration! You don't even have to `rewrite` requests on your reverse proxy!\n- Limits support! Link usage count, file size and storage time.\n- Embeddable! Can run as part of your application.\n\nYou can use filedrop either as a standalone server or as a part of your application.\nIn former case you want to check `filedropd` subpackage, in later case just\nimport `filedrop` package and pass config stucture to `filedrop.New`, returned\nobject implements `http.Handler` so you can use it how you like.\n\n### Installation\n\nThis repository uses Go 1.11 modules. Things may work with old `GOPATH`\napproach but we don't support it so don't report cryptic compilation errors\ncaused by wrong dependency version.\n\n`master` branch contains code from latest (pre-)release. `dev` branch\ncontains bleeding-edge code. You probably want to use one of [tagged\nreleases](https://github.com/foxcpp/filedrop/releases).\n\n#### SQL drivers\n\nfiledrop uses SQL database as a meta-information storage so you need a\nSQL driver for it to use.\n\nWhen building standalone server you may want to enable one of the\nsupported SQL DBMS using build tags:\n* `postgres` for PostgreSQL\n* `sqlite3` for SQLite3\n* `mysql` for MySQL\n\n**Note:** No MS SQL Server support is planned. However if you would like\nto see it - PRs are welcome.\n\nWhen using filedrop as a library you are given more freedom. Just make\nsure that you import driver you use.\n\n#### Library\n\nJust use `github.com/foxcpp/filedrop` as any other library. Documentation\nis here: [godoc.org](https://godoc.org/github.com/foxcpp/filedrop).\n\n#### Standalone server\n\nSee `fildropd` subdirectory. To start server you need a configuration\nfile. See example [here](filedropd/filedropd.example.yml). It should be pretty\nstraightforward. Then just pass path to configuration file in\ncommand-line arguments.\n\n```\nfiledropd /etc/filedropd.yml\n```\n\nsystemd unit file is included for your convenience.\n\n### HTTP API\n\nPOST single file to any endpoint to save it.\nFor example:\n```\nPOST /filedrop\nContent-Type: image/png\nContent-Length: XXXX\n```\n\nYou will get response with full file URL (endpoint used to POST + UUID), like this one:\n```\nhttp://example.com/filedrop/41a8f78c-ce06-11e8-b2ed-b083fe9824ac\n```\n\nYou can add anything as last component to URL to give it human-understandable meaning:\n```\nhttp://example.com/filedrop/41a8f78c-ce06-11e8-b2ed-b083fe9824ac/amazing-screenshot.png\n```\nHowever you can't add more than one component:\n```\nhttp://example.com/filedrop/41a8f78c-ce06-11e8-b2ed-b083fe9824ac/invalid/in/filedrop\n```\n\nYou can specify `max-uses` and `store-time-secs` to override default settings\nfrom server configuration (however you can't set value higher then configured).\n\n```\nPOST /filedrop/screenshot.png?max-uses=5\u0026store-secs=3600\n```\nFollowing request will store file screenshot.png for one hour (3600 seconds)\nand allow it to be downloaded not more than 10 times.\n\n**Note** To get `https` scheme in URLs downstream server should set header\n`X-HTTPS-Downstream` to `1` (or you can also set HTTPSDownstream config option)\n\n### Authorization\n\nWhen using filedrop as a library you can setup custom callbacks\nfor access control.\n\nSee `filedrop.AuthConfig` documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcpp%2Ffiledrop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxcpp%2Ffiledrop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcpp%2Ffiledrop/lists"}