Download the PHP package casperlaitw/filesys without Composer

On this page you can find all versions of the php package casperlaitw/filesys. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filesys

CRIP Filesystem manager (v.1.2.14)

This package easily integrates filesystem manager in to your website. You can use it with TinyMCE editor or just stand alone popup for your input fields. CRIP Filesys Manager is based on Vue.js framework and is stand alone single page application for your filesystem control on server side.

Manager is using Laravel Filesystem to read and write files on the server side. This means that you can configure your Laravel driver and manager will fit to it. Amazon S3, FTP or local storage - your choice where keep files.

Screenshoot

Installation

Require package with composer:

If you are on lower Laravel version that 5.5 (or choose not to use package auto discovery) add this to ServiceProvider in configuration file of your Laravel application config/app.php:

Copy the package resources and views to your local folders with the publish command:

This allows you to override package resource files by updating them directly from your application: views - /resources/views/vendor/cripfilesys and assets in a /public/vendor/crip/cripfilesys folder.

Additionally you can override package configuration file publishing it to your application config folder:

Filesystem manager is not configured to any of routes and you should do it manually. This allows to ad any middleware and will not conflict with any application routes, as it can be anything you choose.

Add new methods in your app\Providers\RouteServiceProvider.php

Now you can add new routes file to map package controllers tou your application routes. Create new file routes/package.php and add content:

Remember - route names for FolderController and FileController are important and should be registered in RouteServiceProvider boot method with pattern to correctly allocate file location in server filesystem.

Configuration

public_url - Public url to assets folder. By default assets are published to /vendor/crip/cripfilesys and this configuration default value is set to this folder.

public_storage - This feature may increase application speed, but in this case files will have public access for everyone, no matter what. If you choose enable it make sure symbolic link is created for your storage directory in case if you use local/public storage configuration.

absolute_url - Make urls to a files absolute. Useful when file manager is located under different domain.

user_folder - This value is indicates value of the subfolder of currently configured storage. This may be useful in case if you want each user or user group to have their own folder - by default single folder is shared for everyone. This can be done creating middleware for routes and defining value on application start-up. Take a look for sample below.

authorization - This value may be useful if your application is SPA and you do not use Laravel sessions to identify users. For packages as JWT you need pass token in a request or may be used Bearer authorization for API. For web routes you may pass 'token' property with value and then all API calls will contain Bearer authorization replacing placeholder with passed token value in a first request of UI part of filesys manager.

thumbs - Uploaded images will be sized to this configured Array. First argument is width and second is height. Third argument describes crop type:

icons.url - Public url to images folder. By default images are published to /vendor/crip/cripfilesys/images/ and this configuration default value is set to this folder.

icons.files - Mapping array between file mime type name and icon image ([type].png).

mime.types - Mapping from file full mime type to type name (array).

mime.media - Mapping between mime type name and media type (array).

mime.map - Mapping between file extension and media type. Used in cases when storage may not get mime type (array).

block - Blocked file extensions and mime types.

actions - Controller actions to allocate file and directory actions.

Usage

TinyMCE

Download and set up TinyMCE editor. Copy plugins folder from published resources \public\vendor\crip\cripfilesys\tinymce\plugins to installed TinyMCE editor plugins directory. Configure TinyMCE to enable cripfilesys plugin in it:

CKEditor

Download and set up CKEditor and configure it to enable cripfilesys plugin in it:

Stand-alone filesystem manager

You can use iframe, FancyBox or Lightbox iframe to open the Fylesystem manager. To handle selected file, add GET parameter to the end of the path: /packages/filemanager?target=callback. You can filter visible files by they type: /packages/filemanager?target=callback&type=[type]. Supported types are:

Types could be configured in package configuration file mime.media section.

To handle filesystem manager selected file url, window object should contain window.cripFilesystemManager function witch will be called on file select with selected file url and all GET parameters of opened window.

Sample

User folder configuration sample

Create new Middleware

app/Http/Middleware/RegisterUserStorageFolder.php:

In this sample I use user methods isAdmin and slug where one is returning boolean indicating that user belongs to administrators group of my application and other one gets unique slug of user name.

Register new Middleware

app/Http/Kernel.php:

Then protect your routes

routes/package.php:


All versions of filesys with dependencies

PHP Build Version
Package Version
Requires casperlaitw/core Version ^7.0
illuminate/support Version ^10.0|^11.0
intervention/image Version ^3.0
php Version ^8.1|^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package casperlaitw/filesys contains the following files

Loading the files please wait ....