{"id":24319505,"url":"https://github.com/pellizzetti/adonis-s3-upload-download-example","last_synced_at":"2025-09-27T04:31:30.549Z","repository":{"id":41796997,"uuid":"176784965","full_name":"pellizzetti/adonis-s3-upload-download-example","owner":"pellizzetti","description":"Simple example of a file upload/download routine using AdonisJS","archived":false,"fork":false,"pushed_at":"2022-12-22T10:45:42.000Z","size":537,"stargazers_count":6,"open_issues_count":11,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-10T12:15:12.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/pellizzetti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-20T17:33:07.000Z","updated_at":"2023-02-05T19:12:33.000Z","dependencies_parsed_at":"2023-01-30T07:15:20.636Z","dependency_job_id":null,"html_url":"https://github.com/pellizzetti/adonis-s3-upload-download-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pellizzetti%2Fadonis-s3-upload-download-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pellizzetti%2Fadonis-s3-upload-download-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pellizzetti%2Fadonis-s3-upload-download-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pellizzetti%2Fadonis-s3-upload-download-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pellizzetti","download_url":"https://codeload.github.com/pellizzetti/adonis-s3-upload-download-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234384554,"owners_count":18823694,"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":[],"created_at":"2025-01-17T15:33:34.533Z","updated_at":"2025-09-27T04:31:25.244Z","avatar_url":"https://github.com/pellizzetti.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adonis-s3-upload-example\n\nSimple example of a file upload routine using **AdonisJS**\n\n## Getting started\n\nInstall dependencies:\n\n```sh\nnpm install\n# OR\n# yarn\n```\n\nRun the application:\n\n```\nadonis serve --dev\n```\n\n## Routes\n```\nGET  '/picture/:filename'          =\u003e 'PictureController.show'\nGET  '/picture/:filename/download' =\u003e 'PictureController.download'\nPOST '/picture'                    =\u003e 'PictureController.upload'\n```\n\n### Methods\n\n\u003e app/Controllers/Http/PictureController.js\n\n---\n\n#### show()\n\nReturn if a file exists in bucket and his formatted url.\n\n##### Parameters\n\n| Name            | Type     | Description             |\n| --------------- | -------- | ----------------------- |\n| params.filename | `string` | Filename to be queried. |\n\n##### Returns\n\n- `{ exists: boolean, fileUrl: string }` Status object\n\n---\n\n#### download()\n\nGet file from bucket and save to local disk.\nIf file doesn't exist return error message.\n\n##### Parameters\n\n| Name              | Type       | Description                                   |\n| ----------------- | ---------- | --------------------------------------------- |\n| params.filename   | `string`   | Filename to be queried.                       |\n| response.send     | `function` | Sets the response body for the HTTP request   |\n| response.download | `function` | Stream a file to the client as HTTP response. |\n\n##### Returns\n\n- `ResponseStream` Pipe stream to the response\n\n---\n\n#### upload()\n\nUpload file to bucket.\n\n##### Parameters\n\n| Name                      | Type       | Description                                          |\n| ------------------------- | ---------- | ---------------------------------------------------- |\n| request.multipart.file    | `function` | Add a listener to file.                              |\n| request.multipart.process | `function` | Process files by going over each part of the stream. |\n\n##### Returns\n\n- `string` Upload successful message.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpellizzetti%2Fadonis-s3-upload-download-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpellizzetti%2Fadonis-s3-upload-download-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpellizzetti%2Fadonis-s3-upload-download-example/lists"}