hakre/dropbox-uploader
最新稳定版本:v1.1.22
Composer 安装命令:
composer require hakre/dropbox-uploader
包简介
Upload files or strings to Dropbox without the Dropbox API
README 文档
README
Dropbox Uploader is a PHP class named DropboxUploader which can be used to upload files to Dropbox, an online
file synchronization and backup service.
Its development was started before Dropbox released their API, and to work, it scrapes their website. So you can and probably should use their API now as it is much more stable. It's the Dropbox Core API in PHP.
You can use the Dropbox Uploader to create a file upload form for your website, which uploads files to your dropbox. The
example.php is a good start; just remove the email/password/destination fields and insert the
respective values.
Usage
require 'DropboxUploader.php';
$uploader = new DropboxUploader('email@address.com', 'password');
$uploader->upload('path/to/a/file.txt');
For a more complete usage example, see example.php.
License
Dropbox Uploader is licensed under the MIT License (MIT).
Troubleshooting
I'm getting the following error:
Error: Cannot execute request: SSL certificate problem, verify that the CA cert is OK.⤦
⤥ Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
This means that the certificate of the Certification Authority (CA) that Dropbox uses for their SSL certificates is not installed on your system or PHP/cURL is not configured correctly to find it.
If you ARE the system administrator, try installing the CA certificates bundle to a system-wide location. If you use a package management system, this will ensure that they are kept up to date automatically. On Debian Linux for example, you can install the package ca-certificates.
If you are NOT the system administrator, you can download just the needed certificate and point DropboxUploader to it (before calling the upload() method):
$uploader->setCaCertificateFile("/absolute/path/to/the/cacert.file");
It is also possible to do this setting in the PHP ini file for PHP 5.3.7 and above. See curl.cainfo for the ini
configuration and look for the CURLOPT_CAINFO option on curl_setopt (PHP manual).
Developing
To develop, it is most easy to checkout the hakre/DropboxUploader branch:
git clone -b development git://github.com/hakre/DropboxUploader
cd DropboxUploader
Them retrieve the dependencies using Composer:
wget http://getcomposer.org/composer.phar
php composer.phar install
Testsuite
Dropbox Uploader comes with a Phpunit testsuite located in the test folder.
To get the testsuite configured, copy phpunit.xml.dist to phpunit.xml and modify the Dropbox email and password
credentials and the SSL certificate store configuration (might be required if not set in PHP ini curl.cainfo).
If you want to use any of these settings from the commandline, set an environment variable with the same name. Environment variables have a higher priority than the XML configuration;
export Dropbox_Credential_Password=your-password-goes-here
You can then invoke the testsuite from the projects root directory:
vendor/bin/phpunit test
Branching
Development is done against hakre/DropboxUploader, the development branch. Create yourself a new branch from it and name it for every non-trivial changes you want to introduce.
Changes are then taken from feature branches into development and then into master.
Expect the development branch to get some force-pushes, just to keep in mind when your development branch diverges - better give your local branch a different name.
hakre/dropbox-uploader 适用场景与选型建议
hakre/dropbox-uploader 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 156.34k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2014 年 05 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「upload」 「dropbox」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 hakre/dropbox-uploader 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hakre/dropbox-uploader 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hakre/dropbox-uploader 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
A simple database backup manager for Symfony2 with support for S3, Rackspace, Dropbox, FTP, SFTP.
Dropbox PHP API V2 SDK (Unofficial)
Laravel Media Popup to upload/view the files
Set of tools for Roundcube webmail
Dropbox PHP API V2 SDK (Unofficial)
统计信息
- 总下载量: 156.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-05-18