{"id":17922714,"url":"https://github.com/overtrue/flysystem-qiniu","last_synced_at":"2025-04-14T18:05:08.509Z","repository":{"id":37663318,"uuid":"84945302","full_name":"overtrue/flysystem-qiniu","owner":"overtrue","description":":floppy_disk: Flysystem adapter for the Qiniu storage.","archived":false,"fork":false,"pushed_at":"2025-03-24T13:13:15.000Z","size":96,"stargazers_count":222,"open_issues_count":1,"forks_count":41,"subscribers_count":5,"default_branch":"3.x","last_synced_at":"2025-04-14T18:03:53.257Z","etag":null,"topics":["flysystem","flysystem-adapter","qiniu","qiniu-sdk","storage"],"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:15:23.000Z","updated_at":"2025-03-31T07:22:26.000Z","dependencies_parsed_at":"2025-04-07T15:00:56.622Z","dependency_job_id":"659cb2ae-40d9-45cc-90e6-d0b6f689fcf8","html_url":"https://github.com/overtrue/flysystem-qiniu","commit_stats":{"total_commits":69,"total_committers":17,"mean_commits":"4.0588235294117645","dds":"0.49275362318840576","last_synced_commit":"5e04ac38be53b57345c56e02973fc4224db776e6"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fflysystem-qiniu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fflysystem-qiniu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fflysystem-qiniu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fflysystem-qiniu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/overtrue","download_url":"https://codeload.github.com/overtrue/flysystem-qiniu/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248933339,"owners_count":21185460,"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":["flysystem","flysystem-adapter","qiniu","qiniu-sdk","storage"],"created_at":"2024-10-28T20:40:34.446Z","updated_at":"2025-04-14T18:05:08.469Z","avatar_url":"https://github.com/overtrue.png","language":"PHP","funding_links":["https://github.com/sponsors/overtrue"],"categories":[],"sub_categories":[],"readme":"## Flysystem Adapter for Qiniu Cloud Storage\n\n:floppy_disk: Flysystem adapter for the Qiniu cloud storage.\n\n[![Build Status](https://travis-ci.org/overtrue/flysystem-qiniu.svg?branch=master)](https://travis-ci.org/overtrue/flysystem-qiniu)\n[![Latest Stable Version](https://poser.pugx.org/overtrue/flysystem-qiniu/v/stable.svg)](https://packagist.org/packages/overtrue/flysystem-qiniu)\n[![Latest Unstable Version](https://poser.pugx.org/overtrue/flysystem-qiniu/v/unstable.svg)](https://packagist.org/packages/overtrue/flysystem-qiniu)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/overtrue/flysystem-qiniu/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/overtrue/flysystem-qiniu/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/overtrue/flysystem-qiniu/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/overtrue/flysystem-qiniu/?branch=master)\n[![Total Downloads](https://poser.pugx.org/overtrue/flysystem-qiniu/downloads)](https://packagist.org/packages/overtrue/flysystem-qiniu)\n[![License](https://poser.pugx.org/overtrue/flysystem-qiniu/license)](https://packagist.org/packages/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-   PHP \u003e= 8.0.2\n\n# Installation\n\n```shell\n$ composer require \"overtrue/flysystem-qiniu\"\n```\n\n# Usage\n\n```php\nuse League\\Flysystem\\Filesystem;\nuse Overtrue\\Flysystem\\Qiniu\\QiniuAdapter;\nuse Overtrue\\Flysystem\\Qiniu\\Plugins\\FetchFile;\n\n$accessKey = 'xxxxxx';\n$secretKey = 'xxxxxx';\n$bucket = 'test-bucket-name';\n$domain = 'xxxx.bkt.clouddn.com'; // or with protocol: https://xxxx.bkt.clouddn.com\n\n$adapter = new QiniuAdapter($accessKey, $secretKey, $bucket, $domain);\n\n$flysystem = new League\\Flysystem\\Filesystem($adapter);\n```\n\n## API\n\n```php\nbool $flysystem-\u003ewrite('file.md', 'contents');\nbool $flysystem-\u003ewrite('file.md', 'http://httpbin.org/robots.txt', ['mime' =\u003e 'application/redirect302']);\nbool $flysystem-\u003ewriteStream('file.md', fopen('path/to/your/local/file.jpg', 'r'));\nbool $flysystem-\u003erename('foo.md', 'bar.md');\nbool $flysystem-\u003ecopy('foo.md', 'foo2.md');\nbool $flysystem-\u003edelete('file.md');\nbool $flysystem-\u003ehas('file.md');\nbool $flysystem-\u003efileExists('file.md');\nbool $flysystem-\u003edirectoryExists('path/to/dir');\nstring|false $flysystem-\u003eread('file.md');\narray $flysystem-\u003elistContents();\nint $flysystem-\u003efileSize('file.md');\nstring $flysystem-\u003emimeType('file.md');\n```\n\nAdapter extended methods:\n\n```php\nstring $adapter-\u003egetUrl('file.md');\nbool|array $adapter-\u003efetch(string $path, string $url);\narray $adapter-\u003erefresh(string $path);\nstring $adapter-\u003egetTemporaryUrl($path, int|string|\\DateTimeInterface $expiration);\nstring $adapter-\u003eprivateDownloadUrl(string $path, int $expires = 3600);\nstring $adapter-\u003egetUploadToken(string $key = null, int $expires = 3600, string $policy = null, string $strictPolice = null)\n```\n\n# Integration\n\n-   Laravel: [overtrue/laravel-filesystem-qiniu](https://github.com/overtrue/laravel-filesystem-qiniu)\n-   Yii2: [krissss/yii2-filesystem-qiniu](https://github.com/krissss/yii2-filesystem-qiniu)\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%2Fflysystem-qiniu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovertrue%2Fflysystem-qiniu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovertrue%2Fflysystem-qiniu/lists"}