[QUESTION] Using Flysystem and the Storage facade #895

emilv opened this Issue Aug 19, 2016 · 4 comments


None yet

4 participants

emilv commented Aug 19, 2016

Package version, Laravel version

    "maatwebsite/excel": "~2.1.0",
    "laravel/framework": "5.1.*",

Expected behaviour

Is there some way to use this library together with Flysystem and the Storage facade? I have seen some references to Illuminate\Filesystem\Filesystem in the codebase but I can't really figure out if you are using it or how we are supposed to make use of it ourselves. Excel::load seems to require a filename on the local filesystem.

I would love some discussion on this topic! Is it possible to make use of Laravel's Flysystem abstractions today, such as the Storage facade? Is there some way to load from a stream instead of a filename? If it is possible, should we perhaps document that with examples? What do you think?

This, or something similar, is what I ultimately expect to be able to do:

Excel::loadFromFilesystem(Storage::disk('whatevz'), 'filename');

or perhaps more general:


I'm afraid that will be difficult as the parent package PHPExcel handles file location in its own way. If you are able to get it working, please let me know. I unfortunately don't have time to look into it myself.

emilv commented Sep 5, 2016

You seem to be correct. I think these two issues in PHPExcel are related to the problem:

We need PHPExcel to work on file handles instead of filenames.

peshi commented Sep 13, 2016

I'm looking for this functionality as well.

onbjerg commented Dec 5, 2016

One way to do this while we wait is probably to store the file locally, then save it upstream and delete it locally. Ugly, but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment