{"id":19756415,"url":"https://github.com/vormkracht10/flysystem-uploadcare","last_synced_at":"2025-04-30T11:33:27.500Z","repository":{"id":148116786,"uuid":"617491235","full_name":"vormkracht10/flysystem-uploadcare","owner":"vormkracht10","description":"Uploadcare Flysystem adapter","archived":false,"fork":false,"pushed_at":"2025-02-14T14:18:56.000Z","size":65,"stargazers_count":16,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-06T01:41:19.277Z","etag":null,"topics":["files","flysystem","flysystem-adapter","laravel","php","uploadcare","uploadcare-api","uploads"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/vormkracht10.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":"vormkracht10"}},"created_at":"2023-03-22T14:00:32.000Z","updated_at":"2025-02-14T14:18:57.000Z","dependencies_parsed_at":"2024-01-24T12:01:30.451Z","dependency_job_id":"c3de3215-e4ec-4db4-a7e6-4bca4ccef405","html_url":"https://github.com/vormkracht10/flysystem-uploadcare","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":"vormkracht10/laravel-package-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vormkracht10%2Fflysystem-uploadcare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vormkracht10%2Fflysystem-uploadcare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vormkracht10%2Fflysystem-uploadcare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vormkracht10%2Fflysystem-uploadcare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vormkracht10","download_url":"https://codeload.github.com/vormkracht10/flysystem-uploadcare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251691626,"owners_count":21628358,"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":["files","flysystem","flysystem-adapter","laravel","php","uploadcare","uploadcare-api","uploads"],"created_at":"2024-11-12T03:15:50.966Z","updated_at":"2025-04-30T11:33:27.489Z","avatar_url":"https://github.com/vormkracht10.png","language":"PHP","funding_links":["https://github.com/sponsors/vormkracht10"],"categories":[],"sub_categories":[],"readme":"# Laravel Uploadcare integration Filesystem (Flysystem adapter)\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/vormkracht10/flysystem-uploadcare.svg?style=flat-square)](https://packagist.org/packages/vormkracht10/flysystem-uploadcare)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/vormkracht10/flysystem-uploadcare/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/vormkracht10/flysystem-uploadcare/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/vormkracht10/flysystem-uploadcare/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/vormkracht10/flysystem-uploadcare/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/vormkracht10/flysystem-uploadcare.svg?style=flat-square)](https://packagist.org/packages/vormkracht10/flysystem-uploadcare)\n\nFlysystem adapter for Uploadcare with support for Laravel v9+.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require vormkracht10/flysystem-uploadcare\n```\n\nAdd the following config to the `disk` array in config/filesystems.php\n\n```php\n[\n    'uploadcare' =\u003e [\n        'driver' =\u003e 'uploadcare',\n        'public' =\u003e env('UPLOADCARE_PUBLIC_KEY'),\n        'secret' =\u003e env('UPLOADCARE_SECRET_KEY'),\n        'cdn' =\u003e env('UPLOADCARE_CDN') // Default https://ucarecdn.com\n    ]\n]\n```\n\nThen set the `FILESYSTEM_DISK` to `uploadcare` and set your public/secret keys in your .env\n\n```env\nUPLOADCARE_PUBLIC_KEY=\nUPLOADCARE_SECRET_KEY=\nFILESYSTEM_DISK=uploadcare\n```\n\n## Examples\n\n**Please note**: Since adding files to uploadcare always returns a unique id that will be used to retrieve files you might wanna use the `*GetUuid()` function(s) for writing files.\n\n```php\n$uuid = Storage::disk('uploadcare')-\u003eputGetUuid('example.txt', 'My notes.');\n\n$uuid = Storage::disk('uploadcare')-\u003eputFileGetUuid('files', new File('/var/www/uploadcare-app/routes/newcontent.txt'));\n\n$uuid = Storage::disk('uploadcare')-\u003eputFileAsGetUuid('files', new File('/var/www/uploadcare-app/routes/newcontent.txt'), 'my-awesome-name.txt');\n\n```\n\n**Get the content of a file**\n\n```php\n$contents = Storage::disk('uploadcare')-\u003eget('\u003cuuid\u003e');\n```\n\n**Deleting a file:**\n\n```php\nStorage::disk('uploadcare')-\u003edelete('\u003cuuid\u003e');\n```\n\n**Getting the mimetype of a file**\n\n```php\n$mimeType = Storage::disk('uploadcare')-\u003emimeType('\u003cuuid\u003e');\n```\n\n**Get the filesize of a file**\n\n```php\n$bytes = Storage::disk('uploadcare')-\u003efilesize('\u003cuuid\u003e');\n```\n\n**Get the original filename**\n\n```php\n$info = Storage::disk('uploadcare')-\u003efileInfo($result[0]);\n$filename = $info-\u003eextraMetadata()['originalFilename'];\n```\n\n**Get a list of files**\n\nDirectories in uploadcare are stored with an \"~\"-sign at the end of a uuid. Getting files from a directory could be retreived\nas follow:\n\n```php\n$files = Storage::disk('uploadcare')-\u003efiles('0123a456-a0bc-0a1b-0ab1-0a1234a5b6c7~');\nforeach ($files as $uuid) {\n    echo 'https://ucarecdn.com/' . $uuid .'\u003cbr /\u003e';\n}\n```\n\n**Working with images?**\nSee [github.com/vormkracht10/php-uploadcare-transformations](https://github.com/vormkracht10/php-uploadcare-transformations)\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n-   [Vormkracht10](https://github.com/vormkracht10)\n-   [Mathieu](https://github.com/casmo)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvormkracht10%2Fflysystem-uploadcare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvormkracht10%2Fflysystem-uploadcare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvormkracht10%2Fflysystem-uploadcare/lists"}