Git Product home page Git Product logo

unisharp / laravel-filemanager Goto Github PK

View Code? Open in Web Editor NEW
2.0K 53.0 708.0 4.54 MB

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.

Home Page: https://unisharp.github.io/laravel-filemanager/

License: MIT License

CSS 2.16% PHP 78.05% JavaScript 8.59% Makefile 0.05% Blade 11.14%
laravel gallery ckeditor tinymce wysiwyg file upload management admin media-gallery

laravel-filemanager's Introduction

Latest Stable Version
StyleCI

RWD demo

DocumentsInstallationIntegrationConfigCustomizationEventsUpgradeDemoFAQ

Features

  • File upload and management
  • Uploading validation
  • Cropping and resizing of images
  • RWD user interface, and can be entirely customized
  • Supporting multiple files selection
  • Supporting cloud storages integration(with Laravel file system)
  • Multiple integration options:
    • WYSIWYG editors integration (CKEditor, TinyMCE, Summernote)
    • Standalone upload button
    • Iframe
  • Multi-user mode:
    • Shared folders: all users can upload and manage files
    • Private folders: dedicated folder for each user, only the owner can upload or manage files within
  • Customizable routes, middlewares, views, and folder path
  • Supports two categories: files and images. Each type works in different directory.
  • Supported locales : ar, az, bg, cs, de, el, en, es, eu, fa, fr, he, hu, id, it, ka, nl, pl, pt, pt-BR, ro, rs, ru, sk, sv, tr, uk, vi, zh-CN, zh-TW

Maintainers

Contributors

Credits

  • @taswler the original author of this package.
  • @olivervogel for the awesome image library.
  • SVG Loaders by Sam (Licensed MIT)
  • Articles and videos which helped promoting this package.
  • All users and you.

laravel-filemanager's People

Contributors

abdulaziz-jm avatar albertcht avatar amin101 avatar andru19 avatar atzeteppema avatar bluehaha2 avatar giokaxo avatar gwleuverink avatar iankov avatar jildertmiedema avatar jonasleitep4 avatar khjay avatar lloricode avatar micovi avatar mikebronner avatar mnightingale avatar mortza avatar nasirkhan avatar nikita240 avatar petyots avatar rohos avatar roylaveto avatar storyn26383 avatar streamtw avatar tsawler avatar vmadmax avatar welcomattic avatar xyundy avatar youchenlee avatar zak293 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-filemanager's Issues

Minimum PHP-Version

Is it possible to set the minimum PHP-Version down to 5.4.0?

I'm bound to use PHP 5.4.24 and tested the package with this version without any issues.

issues in laravel 5.2

hi
i have this problem in laravel 5.2:
uploading :
i can't upload any file or image!

upload

i can't rename folders :
rename


and also, i can't delete folder:
delete

thanks for your great work

Need a more flexible way to customize folders accessibility.

First: Thanks for a great lib. Can you give me a hint as to how I use it with multiple clients? For example users belong to a client and they should all have access to that clients folder of images and files. I see the allow_multi_user config var and the user_field which would've worked great if I had the client_id in the users table but its in a pivot table and my admin users will never have a client_id set.

Any suggestions on what I can change would be most appreciated.

Thanks

Undefined variable: errors

There is an error in src\views\index.blade.php on line 71.
If I change code from:
@if ($errors->any())
to:
@if (isset($errors) && $errors->any())
then it work.

Little syntax error

Hello and thanks for your work.
Little syntax error I've pointed on /src/views/index.blade.php : 152
@include('laravel-filemanager::script');

The semicolon at the end must be removed. It seems to appear on bottom on each filemanager page. A pull-request just for that isn't necessary, is it?

blank laravel filemanager after integration

filemanager

In the above image you can see the error is showing. I am getting the blank folder of the laravel file manager. I have integrated it with TinyMCE. Please help me to solve the error.
This is the code used for tinyMCE.

project path is : http://localhost/laraveladmin/public/

<script> var editor_config = { path_absolute : "http://localhost/laraveladmin/public/", selector: ".tinymce-default", plugins: [ "advlist autolink lists link image charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code fullscreen", "insertdatetime media nonbreaking save table contextmenu directionality", "emoticons template paste textcolor colorpicker textpattern" ], toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media", relative_urls: false, file_browser_callback : function(field_name, url, type, win) { var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth; var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight; var cmsURL = editor_config.path_absolute + 'laravel-filemanager?field_name=' + field_name; if (type == 'image') { cmsURL = cmsURL + "&type=Images"; } else { cmsURL = cmsURL + "&type=Files"; } tinyMCE.activeEditor.windowManager.open({ file : cmsURL, title : 'Filemanager', width : x * 0.8, height : y * 0.8, resizable : "yes", close_previous : "no" }); } }; tinymce.init(editor_config); </script>

Bug : thumb image url issue

i have noticed thumb urls has an extra redundant \thumbs in its src url :
also thumb's image id seems odd , it has an /thumbs/ substring , that i think it should be modified too.

     <img id="E:\xampp\htdocs\pnu/public/photos/1/\thumbs//56d2c43764003.jpg"
         onclick="useFile('56d2c43764003.jpg')" style="cursor:pointer;" alt="" 
          src="/photos/1/\thumbs/thumbs/56d2c43764003.jpg">

Token mismatch error while uploading file

When trying to upload a file, a TokenMismatchException is thrown Laravel 5.2. I checked the upload form and '_token' input has been set, but don't know why this happens.

As I have upgraded from 1.2, Is it likely that an incomplete upgrade is causing this problem? Is there a fix for this issue?

Browse Server Button Redirecting to Site Root

When attempting to integrate laravel-filemanager into both CKEditor and TinyMCE as per the directions in README.md, making a get request as an authenticated user to /laravel-filemanager/folders redirects to the site root.

Error 500 on last release

I caught error 500 on /laravel-filemanager route since last release.
No more information, sorry.

Investigate on last PR ;)

data-input not working

I have the following code in my template :

<a href="#"
      class="filemanager filemanagerImages btn btn-primary"
      data-input="testManagerField"
      data-preview="testManagerHolder">
    Choose an image
</a>
<input type="text"
       id="testManagerField">
<img id="testManagerHolder">

And the following code in my javascript file

$('.filemanager').click(function (e)
{
    e.preventDefault();
});

$('.filemanagerFiles').filemanager('file');
$('.filemanagerImages').filemanager('image');

When a file is selected the preview image is successfully changed, but the input field's value is never changed. Any thoughts?

error on view parameter : Trying to get property of non-object Laravel 5.1 Sentinel

I'm using laravel 5.1, and Sentinel Package as auth manager. Here is my lfm.php:
`
return [
'rename_file' => true,

'use_package_routes' => true,

'middlewares'        => ['SentinelAdmin'],

'allow_multi_user'   => false,

'user_field'         => 'id',

'shared_folder_name' => 'shares',
'thumb_folder_name'  => 'thumbs',

'images_dir'         => 'public/uploads/images',
'images_url'         => '/images/',

'files_dir'          => 'public/uploads/files/',
'files_url'          => '/files/',

`
While open the image browser from tinyMCE 4, its fire error :

Trying to get property of non-object

, My guess every index view parameter like $error, $working_dir doesnt get their value.

Am I missing some steps? TIA

htmlentities() expects parameter 1 to be string, array given

The source of this problem:

@foreach($dirs as $key => $dir)
        <li>
            <a class="pointer" id="folder_{{ $key }}" data-id="{{ $dir }}" onclick="clickFolder('folder_{{ $key }}', 0)">
                <i class="fa fa-folder folder-item" data-id="{{ $dir }}" id="{{ $dir }}-folder"></i> {!! $dir !!}
            </a>
        </li>
@endforeach

The fix isn't that difficult, actually. The reason this is happening, is because $dir contains 2 elements, with the keys short and long. While I do not exactly know which ones are needed, this was sitting in the 1.5.2 branch, and hasn't been fixed in master since.

Could it be that my version is broken or mismatched? I did check the vendor folder to see whether it was just my views, or whether it was in the package itself, and the conclusion of that is just above.

use filemanager separate from editor

is it possible to use this filemanager apart from tinymce \ckeditor ?
i tried /laravel-filemanager?field_name=thumbnail&type=Images" . it does open the image browser but when i try to select an image it doesnt close image browser and nothing happen
Responsive File Manager has a callback (responsive_filemanager_callback) that run when an image is selected in its file browser.
I dont know if there is a such callback for this filemanager

Create new folders in shared

Is there a reason, why we cant add subfolders in the shared folder? Wanted to build a shared imagelib for all my authors. But they need to sort the images in folders.

Unisharp shows empty directory.

when i started to integrate file-manager with laravel 5.2 i set the filebrowserImageBrowserUrl: to access routes /laravel-filemanager?type=images.
the browse button shown, but when i clicked the button, it showed empty directory.
why
and all link above can't be clicked. (when i clicked they do nothing)

LfmController line 84, "\Auth::user()->user_field"

When using php artisan route:list I get a Trying to get property of non-object
Its due to Auth::user() not being set because its artisan doh :).

Just guessing here but, it seems laravel runs its controller constructors when compiling routes.

Can't access subfolders.

I can not navigate into subfolders. The package always asks for folders from the server appended to "files_url" as if it is a root folder in "files_dir".

Thanks.

pdf/docs support?

NotReadableException in Decoder.php line 20:
Unable to read image from file 

Hangs on file upload

Hi, I'm using laravel 5.2 on debian.
When I try to upload anything than img file, it hangs.
But the file gets uploaded to photos folder, when I try to insert it into CKeditor it creates an img tag.

Thumbs folder issue on MS Windows

I have a problem with thumbs folder since it's listed along with images.
I saw in the code that this folder shouldn't be listed, but it's.

public function getDirectories($path)
    {
        $thumb_folder_name = Config::get('lfm.thumb_folder_name');
        $all_directories = File::directories(base_path($path));

        $arr_dir = [];

        foreach ($all_directories as $directory) {
            $dir_name = $this->getFileName($directory);

            if ($dir_name !== $thumb_folder_name) {
                $arr_dir[] = $dir_name;
            }
        }

        return $arr_dir;
    }

screenshot_2

How to use Events and Listeners Laravel 5.2.3

Hi all,

Can you tell me how to use Laravel listeners and events : "When upload file, when remove file, when i move a file, etc...". In the global readme in the repository there is a doc but not compatible with current version.

Can you help me please ?

Thank's a lot !

Best regards,

Emmanuel.

Change CDN loaded front vendor to local ones

I think it's better to build package own vendors.js and vendors.css files to avoid to load each vendors file from a CDN.

We can reduce HTTP request and filemanager window loading time 😉

Maybe use Bower and a small gulpfile to build it?

class error

i got an error while installing, when i try to run php artisan vendor:publish --tag=lfm_config or php artisan vendor:publish --tag=lfm_public. It give me

[ErrorException]
array_push() expects parameter 1 to be array, null given

but if i remove Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider::class, from app.php
no more error but when i try to publish it give me
Nothing to publish for tag [lfm_config].
or
Nothing to publish for tag [lfm_public].

Edit:
nvm i see the error fix and fix it by myself

Error on File upload, Images behaviour executed

I'm trying to upload a .pdf file via the Filemanager popup, but Images behaviour is executed.

It looks like input[name=type] is missing on files view, then lfm_type is never set to Files.

I'll give more info during my debugging work.

Open for a input field

I wan to use this file manager with a input field. If i click on a button, the file browser should appear and i will select the file. This feature is available in CKFinder can you please tell me now can i do it here?

Bug when creating a folder in subfolder

When i create a folder in a subfolder; two folders get created; one in subfolder (appropriate place) and another in the same level as the folder i am in (buggy).

Thanks.

where are the routes?

what are the routes to add to my routes.php file so i can access the scaipt?
i tried to point the route to the package folder to LfmController but it says that it can't be accessed

Actions configuration

I would like to configurate the access to the actions.
Maybe it is an idea to make it able to configurate in the config file.
It's possible to do it as following :
'resize' => false // User will not be able to resize images
This is just an example.

Add Ckeditor

Ckeditor can be add under lfm_public publishing?

problem with tinyMCE package button

hi,
when install file manager how to add filemanager toolbar button to MCE?
my code for blade file is:

                         @include('tinymce::tpl')
                        <textarea id="tinymce" cols="30" rows="15"></textarea>

and my config file is:

return [

    'cdn' => config('public.url').'/vendor/js/tinymce/tinymce.min.js',
    'params' => [
        "selector" => "#tinymce",
        "language" => 'en_GB',
        "theme" => "modern",
        "skin" => "lightgray",
        "directionality" => "rtl",
        "plugins" => [
            "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
            "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
            "save table contextmenu directionality emoticons template paste textcolor autosave"
        ],
        "external_filemanager_path" =>"/filemanager/",
        "filemanager_title" =>"Responsive Filemanager",
        "toolbar" => "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | preview media | forecolor backcolor emoticons code",
    ]


];

Browse buttons not shown

Hi,

for some reason the buttons don't show up. I installed the package UniSharp/laravel-ckeditor first and then this package. The editor works, also the URLs to the different browsers work (including the uploads). However... the buttons don't seem to show up!

I published everything, configured it to my liking.. just those buttons. I tripple checked the configuration of the jquery adapter. This is the code I'm using:

<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
<script src="/vendor/unisharp/laravel-ckeditor/adapters/jquery.js"></script>
<script>
    $( 'textarea.editor' ).ckeditor({
        filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images',
        filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token={{csrf_token()}}',
        filebrowserBrowseUrl: '/laravel-filemanager?type=Files',
        filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token={{csrf_token()}}'
    });
</script>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.