Giter Club home page Giter Club logo

laravel-filer's People

Contributors

farwel avatar madbob avatar riari avatar victorlap 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

Watchers

 avatar  avatar  avatar  avatar

laravel-filer's Issues

Download file using file title

Currently when I am processing a file, php renames the file to a random string like phpBeceYT. This is fine, however I would like to download the file with the original name. Therefore I set the title to the original filename. How can this be achieved with laravel-filer? Because right now, when I download the file, I don;t get a file with the correct extension.

Problem with multifiles attach

Hello, thanks for good work.
but there is a problem with multiple files . If I create -> attach ($ file) for one model more than once, in the table filer_attacments recorded only the last attach.
in file AttachableTrait.php i find follow code:

        $attach = Attachment::firstOrNew([
            'user_id'   => $userID,
            'model_id'  => $this->id,
            'model_key' => $options['key']
        ]);

and change to

        $attach = new Attachment([
            'user_id'   => $userID,
            'model_id'  => $this->id,
            'model_key' => $options['key']
        ]);

It work for new multiattachments. but it have not tested it for update (I do not know how to do it).
sorry for bad english.

problem with multiple files

hello , first thanks for this great package

I'm having issue when useing attach inside a foreach loop
It saves the files to db.filer_attachments , but only adds a relation to db.filer_local_files to the last file only
any ideas ?

Attachment->user() won't work

Since method Attachment->user() uses config('filer.user.model') to get the related user model class, the published config file should also provide a related entry like

    'user' => [
        'model' => App\User::class,
    ],

or something similar. Otherwise the use of the method will raise an execption

FatalErrorException in Model.php line 765: Class name must be a valid object or a string

Allow null on user_id

Hi! Great job on the package, is just what I was looking for, a simple way to manage attachments with polymorphic relations. Cool.

Just one note: I think it would be nice that user_id at filer_attachment table could accept the null value. In my case, I'm attaching to a model without any user relation relevance so now I would need to relate the attachement to a dummy user. Allow null in this case will be perfect, I think this would improve the versatility of the package.

Regards!

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.