{"id":13704695,"url":"https://github.com/overtrue/laravel-filesystem-qiniu","last_synced_at":"2025-05-14T13:06:13.411Z","repository":{"id":18670826,"uuid":"84946155","full_name":"overtrue/laravel-filesystem-qiniu","owner":"overtrue","description":"A Qiniu Storage filesystem for Laravel","archived":false,"fork":false,"pushed_at":"2025-02-25T14:26:17.000Z","size":53,"stargazers_count":470,"open_issues_count":2,"forks_count":34,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-11T06:04:36.736Z","etag":null,"topics":["filesystem","flysystem-adapter","laravel-filesystem","laravel-package","qiniu"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/overtrue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["overtrue"]}},"created_at":"2017-03-14T12:25:13.000Z","updated_at":"2025-03-27T06:51:17.000Z","dependencies_parsed_at":"2024-01-12T10:26:13.011Z","dependency_job_id":"3f185a0f-a8fa-4e9e-9439-5f6037919f97","html_url":"https://github.com/overtrue/laravel-filesystem-qiniu","commit_stats":{"total_commits":36,"total_committers":10,"mean_commits":3.6,"dds":"0.33333333333333337","last_synced_commit":"0010242e583857d84792fba740a06b6dae2a7be4"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Flaravel-filesystem-qiniu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Flaravel-filesystem-qiniu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Flaravel-filesystem-qiniu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Flaravel-filesystem-qiniu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/overtrue","download_url":"https://codeload.github.com/overtrue/laravel-filesystem-qiniu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149949,"owners_count":22022851,"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":["filesystem","flysystem-adapter","laravel-filesystem","laravel-package","qiniu"],"created_at":"2024-08-02T21:01:18.302Z","updated_at":"2025-05-14T13:06:13.361Z","avatar_url":"https://github.com/overtrue.png","language":"PHP","funding_links":["https://github.com/sponsors/overtrue"],"categories":["配置 Configuration","第三方API( Third Party APIs )"],"sub_categories":["第三方api Third Party APIs"],"readme":"# Laravel filesystem Qiniu\n\n[Qiniu](http://www.qiniu.com/) storage for Laravel based on [overtrue/flysystem-qiniu](https://github.com/overtrue/flysystem-qiniu).\n\n[![Sponsor me](https://github.com/overtrue/overtrue/blob/master/sponsor-me-button-s.svg?raw=true)](https://github.com/sponsors/overtrue)\n\n# Requirement\n\n-   Laravel \u003e= 9.0\n\n# Installation\n\n```shell\n$ composer require \"overtrue/laravel-filesystem-qiniu\"\n```\n\n# Configuration\n\n1. After installing the library, register the `Overtrue\\LaravelFilesystem\\Qiniu\\QiniuStorageServiceProvider` in your `config/app.php` file:\n\n```php\n'providers' =\u003e [\n    // Other service providers...\n    Overtrue\\LaravelFilesystem\\Qiniu\\QiniuStorageServiceProvider::class,\n],\n```\n\n2. Add a new disk to your `config/filesystems.php` config:\n\n```php\n\u003c?php\n\nreturn [\n   'disks' =\u003e [\n        //...\n        'qiniu' =\u003e [\n           'driver'     =\u003e 'qiniu',\n           'access_key' =\u003e env('QINIU_ACCESS_KEY', 'xxxxxxxxxxxxxxxx'),\n           'secret_key' =\u003e env('QINIU_SECRET_KEY', 'xxxxxxxxxxxxxxxx'),\n           'bucket'     =\u003e env('QINIU_BUCKET', 'test'),\n           'domain'     =\u003e env('QINIU_DOMAIN', 'xxx.clouddn.com'), // or host: https://xxxx.clouddn.com\n        ],\n        //...\n    ]\n];\n```\n\n# Usage\n\n```php\n$disk = Storage::disk('qiniu');\n\n// create a file\n$disk-\u003eput('avatars/filename.jpg', $fileContents);\n\n// check if a file exists\n$exists = $disk-\u003ehas('file.jpg');\n\n// get timestamp\n$time = $disk-\u003elastModified('file1.jpg');\n\n// copy a file\n$disk-\u003ecopy('old/file1.jpg', 'new/file1.jpg');\n\n// move a file\n$disk-\u003emove('old/file1.jpg', 'new/file1.jpg');\n\n// get file contents\n$contents = $disk-\u003eread('folder/my_file.txt');\n\n// fetch url content\n$file = $disk-\u003egetAdapter()-\u003efetch('folder/save_as.txt', $fromUrl);\n\n// get file url\n$url = $disk-\u003egetAdapter()-\u003egetUrl('folder/my_file.txt');\n\n// get file upload token\n$token = $disk-\u003egetAdapter()-\u003egetUploadToken('folder/my_file.txt');\n$token = $disk-\u003egetAdapter()-\u003egetUploadToken('folder/my_file.txt', 3600);\n\n// get private url\n$url = $disk-\u003egetAdapter()-\u003eprivateDownloadUrl('folder/my_file.txt');\n```\n\n[Full API documentation.](http://flysystem.thephpleague.com/api/)\n\n## :heart: Sponsor me\n\n[![Sponsor me](https://github.com/overtrue/overtrue/blob/master/sponsor-me.svg?raw=true)](https://github.com/sponsors/overtrue)\n\n如果你喜欢我的项目并想支持它，[点击这里 :heart:](https://github.com/sponsors/overtrue)\n\n## Project supported by JetBrains\n\nMany thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.\n\n[![](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/?from=https://github.com/overtrue)\n\n## PHP 扩展包开发\n\n\u003e 想知道如何从零开始构建 PHP 扩展包？\n\u003e\n\u003e 请关注我的实战课程，我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package)\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovertrue%2Flaravel-filesystem-qiniu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovertrue%2Flaravel-filesystem-qiniu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovertrue%2Flaravel-filesystem-qiniu/lists"}