hcipl/dropzone-with-dropbox
Composer 安装命令:
composer require hcipl/dropzone-with-dropbox
包简介
Dropzone file upload with dropbox
README 文档
README
Dropzone file upload with dropbox.
Live url : (https://packagist.org/packages/hcipl/dropzone-with-dropbox)
Usage
- Install the package: "composer require hcipl/dropzone-with-dropbox".
- Configure your database ".env" file.
- The first thing you need to do is get an authorization token at Dropbox. Unlike other companies Dropbox has made this very easy. You can just generate a token in the App Console for any Dropbox API app. You'll find more info at the Dropbox Developer Blog.
- Set dropbox configuration on your .env file
- Configure Dropbox as Driver in AppServiceProvider.php
public function boot()
{
Storage::extend('dropbox', function (Application $app, array $config) {
$adapter = new DropboxAdapter(new DropboxClient(
$config['authorization_token']
));
return new FilesystemAdapter(
new Filesystem($adapter, $config),
$adapter,
$config
);
});
}
- Add a new driver on the config/filesystems.php inside "disks".
'dropbox' => [
'driver' => 'dropbox',
'key' => env('DROPBOX_APP_KEY'),
'secret' => env('DROPBOX_APP_SECRET'),
'authorization_token' => env('DROPBOX_AUTHORIZATION_TOKEN', null),
'case_sensitive' => true,
]
- Run migration: "php artisan migrate"
- Run project server "php artisan serve",
- Test url "http://127.0.0.1:8000/image/index"
Views Modification
In order to modify the dropzone:
- Select the option which depicts "Provider:Hcipl\dropzoneWithDropbox\DropzoneWithDropboxServiceProvider".
- Run below command to publish the assests. php artisan vendor:publish --tag=public --force
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-13