Dropbox Driver laravel

Dropbox Filesystem Laravel 5.4+

Now time for laravel with Hello Laravel .

You know about laravel filesystem is that is follow league/flysystem.

Supported Drivers: local, ftp, s3, rackspace . laravel present those drivers properly . Laravel doc has a custom driver thai is Dropbox but the documentation is very poor about dropbox driver ..

  • 5 steps you can use Dropbox driver as your project filesystem .

# Install by composer

composer require benjamincrozat/laravel-dropbox-driver

#Add provider, In your config/app.php

'providers' => [

BC\Laravel\DropboxDriver\ServiceProvider::class,

],

# Add dropbox driver app/filesystems.php

'disks' => [

'dropbox' => [
'driver' => 'dropbox',
'app_secret' => env('DROPBOX_APP_SECRET'),
'token' => env('DROPBOX_TOKEN'),
],

],

# Now your .env file

DROPBOX_APP_SECRET=your_app_secret_key
DROPBOX_TOKEN=your_access_token

Done your dropbox driver .

you can now use as like…

Storage::disk('dropbox')->put('file.txt', 'Hello laravel ');
Storage::disk('dropbox')->delete('file.txt');

……………………………………………………………………………………

  • ** If you face -> The Dropbox SDK uses 64-bit integers
  • go to -> vendor\dropbox\dropbox-sdk\lib\Dropbox\RequestUtil.php
  • then search this keyword_-> 64-bit integers
if (strlen((string) PHP_INT_MAX) < 1) {
// Looks like we're running on a 32-bit build of PHP. This could cause problems because some of the numbers
// we use (file sizes, quota, etc) can be larger than 32-bit ints can handle.
throw new \Exception("The Dropbox SDK uses 64-bit integers, but it looks like we're running on a version of PHP that doesn't support 64-bit integers (PHP_INT_MAX=" . ((string) PHP_INT_MAX) . "). Library: \"" . __FILE__ . "\"");
}

main topic set less than 1 , may be there have less than 19

if (strlen((string) PHP_INT_MAX) < 1) {

}

05/16/2017 //Md Mostafa Kamal