{"id":13781544,"url":"https://github.com/liam-edwards/adonisjs-cloudinary","last_synced_at":"2025-07-22T20:34:21.059Z","repository":{"id":57173660,"uuid":"388452288","full_name":"liam-edwards/adonisjs-cloudinary","owner":"liam-edwards","description":"AdonisJS Cloudinary","archived":false,"fork":false,"pushed_at":"2021-07-25T08:12:01.000Z","size":23,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T04:56:50.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/liam-edwards.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":"2021-07-22T12:20:53.000Z","updated_at":"2023-12-12T03:52:39.000Z","dependencies_parsed_at":"2022-08-24T14:40:43.968Z","dependency_job_id":null,"html_url":"https://github.com/liam-edwards/adonisjs-cloudinary","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/liam-edwards/adonisjs-cloudinary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liam-edwards%2Fadonisjs-cloudinary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liam-edwards%2Fadonisjs-cloudinary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liam-edwards%2Fadonisjs-cloudinary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liam-edwards%2Fadonisjs-cloudinary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liam-edwards","download_url":"https://codeload.github.com/liam-edwards/adonisjs-cloudinary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liam-edwards%2Fadonisjs-cloudinary/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266567640,"owners_count":23949391,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-03T18:01:26.964Z","updated_at":"2025-07-22T20:34:21.034Z","avatar_url":"https://github.com/liam-edwards.png","language":"TypeScript","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"# AdonisJS Cloudinary\n\n[![npm-image]][npm-url] [![license-image]][license-url] [![typescript-image]][typescript-url]\n\nA Cloudinary Wrapper for Adonis 5\n\n## Installation\n\nInstall with either `npm` or `yarn`.\n\n```bash\nnpm i adonisjs-cloudinary\nyarn add adonisjs-cloudinary\n```\n\nAnd initialise the package\n```bash\nnode ace configure adonisjs-cloudinary\n```\n\n## How to use\n\n### Step 1: Get your API key and API secret\n\nUpon creating a Cloudinary account, you will be given your API key and API secret. If you already have an account,\nyou can find these in your account settings under the \"Security\" section.\n\nYour cloud name will be under found in the \"Account\" section of your settings.\n\n### Step 2: Initialisation\n\nAdd variables to `.env` file of project.\n\n```txt\n...\nCLOUDINARY_CLOUD_NAME=YOUR_CLOUD_NAME\nCLOUDINARY_API_KEY=YOUR_KEY\nCLOUDINARY_API_SECRET=YOUR_SECRET\n```\n\n### Step 3: Upload an image\n\nYou can upload an image to Cloudinary using the `upload` method passing in the file path and a public ID.\n\n```ts\nimport cloudinary from '@ioc:Adonis/Addons/Cloudinary'\n\nawait cloudinary.upload(filePath, publicId)\n```\n\nYou can alternatively pass in a file object\n\n```ts\npublic async store({ request }: HttpContextContract) {\n\tconst file = request.file('your_file')\n    if (file) {\n    \tawait cloudinary.upload(file, file.clientName)\n    }\n}\n```\n\nThe upload method returns an object the contains the image's public ID, URL, secure URL, and more if the upload is\nsuccessful.\n\n### Step 4: Show your image\n\nTo get the URL for your image, you can use the `show` method, passing in your public ID and optionally an object\ncontaining your transformation options.\n\n```ts\nconst url = cloudinary.show('your_public_id')\n```\n\nBy default, this method will use the transformation options found in the `cloudinary.ts` config file:\n\n```ts\n{\n    transformation: {\n        format: 'png',\n    },\n    width:  150,\n    height: 150,\n    crop:   'fit',\n}\n```\n\n[npm-image]: https://img.shields.io/npm/v/adonisjs-cloudinary?logo=npm\u0026style=for-the-badge\n[npm-url]: https://www.npmjs.com/package/adonisjs-cloudinary\n\n[license-image]: https://img.shields.io/npm/l/adonisjs-cloudinary?style=for-the-badge\u0026color=blueviolet\n[license-url]: https://github.com/liam-edwards/adonisjs-cloudinary/blob/master/LICENSE\n\n[typescript-image]: https://img.shields.io/npm/types/adonisjs-cloudinary?color=294E80\u0026label=%20\u0026logo=typescript\u0026style=for-the-badge\n[typescript-url]: https://github.com/liam-edwards/adonisjs-cloudinar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliam-edwards%2Fadonisjs-cloudinary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliam-edwards%2Fadonisjs-cloudinary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliam-edwards%2Fadonisjs-cloudinary/lists"}