{"id":18367193,"url":"https://github.com/amoutonbrady/gupload","last_synced_at":"2026-05-04T22:43:43.246Z","repository":{"id":98918655,"uuid":"289492862","full_name":"amoutonbrady/gupload","owner":"amoutonbrady","description":"An easy file uploading solution for simple uploads needs","archived":false,"fork":false,"pushed_at":"2020-08-24T07:44:15.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-06-23T05:37:20.786Z","etag":null,"topics":["docker","fileupload","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amoutonbrady.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2020-08-22T13:28:28.000Z","updated_at":"2020-08-24T07:44:18.000Z","dependencies_parsed_at":"2023-03-07T09:01:04.887Z","dependency_job_id":null,"html_url":"https://github.com/amoutonbrady/gupload","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/amoutonbrady/gupload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoutonbrady%2Fgupload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoutonbrady%2Fgupload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoutonbrady%2Fgupload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoutonbrady%2Fgupload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amoutonbrady","download_url":"https://codeload.github.com/amoutonbrady/gupload/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoutonbrady%2Fgupload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32628211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","fileupload","nodejs"],"created_at":"2024-11-05T23:20:29.580Z","updated_at":"2026-05-04T22:43:43.216Z","avatar_url":"https://github.com/amoutonbrady.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gupload\n\nAn easy file uploading solution for simple uploads needs\n\n## Usage\n\n- `[GET] /:filename`\n  - Query: If you only pass one of those parameters, the original image will be sent\n    - `h`: number // Height of the image\n    - `w`: number // Width of the image\n- `[POST] /upload`\n  - Body: The body needs to have a field named File and a content-type `multipart/form-data;`\n    - `file`: File;\n\n## Example\n\n```bash\n# Upload\n\n$ curl --location --request POST 'http://0.0.0.0:4242/upload' --form 'file=@/path/to/file'\n# Response:\n# {\n#    \"fieldname\": \"file\",\n#    \"filename\": \"058c03293925ead7a559216a877d1bc1.jpg\",\n#    \"mimetype\": \"image/jpeg\",\n#    \"originalname\": \"pexels-pixabay-36717.jpg\",\n#    \"size\": 152231\n# }\n```\n\n```bash\n# Fetch\n\n$ curl --location --request GET 'http://0.0.0.0:4242/058c03293925ead7a559216a877d1bc1.jpg'\n# Response:\n# The image!\n\n$ curl --location --request GET 'http://0.0.0.0:4242/058c03293925ead7a559216a877d1bc1.jpg?w=400\u0026h=400'\n# Response:\n# The image in 400x400 (granted we allowed this in the conf)!\n```\n\n## Running\n\n## From scratch:\n\n```bash\n$ git clone git@github.com:amoutonbrady/gupload.git`\n$ pnpm install # (might use yarn or npm if you will, but it was tested only with pnpm)\n$ pnpm build # compile TS to JS\n$ pnpm start # start the compiled server\n$ pnpm dev # do the two commands above in one command\n```\n\n## Dockerfile:\n\n`$ docker run -p 4242:4242 -v ./.images:/var/www/images amoutonbrady/gupload`\n\n## Docker-compose:\n\n```yaml\nversion: \"3.8\"\n\nservices:\n  img:\n    image: amoutonbrady/gupload\n    export:\n    \n    environments:\n      PORT: 4242\n      HOST: 0.0.0.0\n      MAX_SIZE_MB: \"20\"\n      VALID_SIZES: \"['400']\"\n      ALLOWED_ORIGINS: '[\"http://0.0.0.0:4242/\"]'\n    ports:\n      - \"4242:4242\"\n    volumes:\n      - ./.images:/var/www/images\n```\n\n## Configuration \u0026 defaults\n\nConfigration is done through env variables.\n\n| Variable          | Description                          | Type       | Default                  |\n| ----------------- | ------------------------------------ | ---------- | ------------------------ |\n| `MAX_SIZE_MB`     | Maximum size per file in MB          | `number`   | 20                       |\n| `VALID_SIZES`     | List of sizes available for resizing | `number[]` | [400]                    |\n| `ALLOWED_ORIGINS` | List of allowed origins for CORS     | `string[]` | [\"http://0.0.0.0:4242/\"] |\n| `PORT`            | -                                    | `number`   | 4242                     |\n| `HOST`            | -                                    | `string`   | \"0.0.0.0\"                |\n\n## Technologies used\n\n- [Fastify](https://www.fastify.io/): Fast HTTP server with a wide ecosystem of plugins\n- [Sharp](https://sharp.pixelplumbing.com/): Image manipulation library (used to resize images)\n- [Hasha](https://github.com/sindresorhus/hasha): md5 generation helper\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famoutonbrady%2Fgupload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famoutonbrady%2Fgupload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famoutonbrady%2Fgupload/lists"}