PHPackages                             geeky/file - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. geeky/file

ActiveLibrary[File &amp; Storage](/categories/file-storage)

geeky/file
==========

Make laravel files easy to upload 'local | bublic | s3 | ...'

1.0(8y ago)112MITPHP

Since Apr 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/TheGeekyM/file)[ Packagist](https://packagist.org/packages/geeky/file)[ RSS](/packages/geeky-file/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

This package make upload files so easy localy or on cloud just determine what is your disk in the config file and enjoy uploading.

Requirements
------------

[](#requirements)

For the creation of thumbnails of svg's or pdf's you should also install Imagick.

Installation
------------

[](#installation)

Install using composer:

```
  composer require geeky/file

```

Then, in `config/app.php`, add the following to the service providers array.

```
array(
   ...
  Geeky\File\FileServiceProvider::class,
)

```

Finally, in `config/app.php`, add the following to the facades array.

```
array(
    ...
     'Gfile' => Geeky\file\FileFacade::class,
)

```

Usage
-----

[](#usage)

Example usage using Facade:

Upload file .. If the uploaded file is image it will upload the original image in the path you want and it will make thumbs dir in the same path to store thumb image automatically and you determine the max-width and the quality of thumb images from config file.

```
Gfile::upload($file , 'path/you/want/');

```

Delete files.. You can pass a sigle file path or an array of files paths to delete

```
Gfile::delete($file_path);

```

Get file visibility.. You can get the visibility of any file you want .. the visibility should be public or private

```
Gfile::getVisibility($file_path);

```

Set file visibility.. You can set the visibility of any file you want .. the visibility should be public or private

```
Gfile::stVisibility($file_path);

```

You can publish the config-file with:

```
php artisan vendor:publish --provider="Geeky\File\FileServiceProvider" --tag="config"

```

This is the contents of the published config file:

```
