Skip to content

Added league/flysystem to also be a possible filesystem - #213

Merged
bytehead merged 3 commits into
1up-lab:masterfrom
lsv:integrate-flysystem
Jan 28, 2016
Merged

Added league/flysystem to also be a possible filesystem#213
bytehead merged 3 commits into
1up-lab:masterfrom
lsv:integrate-flysystem

Conversation

@lsv

@lsv lsv commented Jan 19, 2016

Copy link
Copy Markdown
Contributor

Integrated Flysystem so not only gaufrette is a option

@lsv

lsv commented Jan 19, 2016

Copy link
Copy Markdown
Contributor Author

Could someone test it with s3?

I will also write some documentation on how to use it, if accepted

@lsv

lsv commented Jan 19, 2016

Copy link
Copy Markdown
Contributor Author

Tested with

  • Local
  • Dropbox
  • Orphange

@bytehead

Copy link
Copy Markdown
Member

Hi @lsv ! Thanks for your PR, looks really good to me. And thanks for testing! My bad, that I can't test it with s3...

@lsv

lsv commented Jan 20, 2016

Copy link
Copy Markdown
Contributor Author

The failed tests are PHP 5.3 as flysystem requires PHP 5.4
I would suggest not support 5.3 anymore?

@bytehead

Copy link
Copy Markdown
Member

Yes, I saw it. I would say we can skip 5.3 due to the fact that 5.3 is EOL since 14th of august 2014.

@lsv

lsv commented Jan 20, 2016

Copy link
Copy Markdown
Contributor Author

And the reason for using flysystem imo gaufrette is somekind of dead, and lot of other bundles are using flysystem instead.

@bytehead

Copy link
Copy Markdown
Member

Can you drop the 5.3 support in travis.yml within this PR?

@rvmourik

Copy link
Copy Markdown

Is there an estimate when this fork will be merged? I'm looking forward in using flysystem with this bundle

bytehead added a commit that referenced this pull request Jan 28, 2016
Added league/flysystem to also be a possible filesystem
@bytehead
bytehead merged commit 6d94579 into 1up-lab:master Jan 28, 2016
@bytehead

Copy link
Copy Markdown
Member

@rvmourik 1.5.0 is out :)

@rvmourik

Copy link
Copy Markdown

@bytehead Thanks, that was pretty quick :-)

@bytehead

Copy link
Copy Markdown
Member

It was on my list for at least 8 days ;-)

@bytehead

Copy link
Copy Markdown
Member

@lsv: @sheeep is pretty happy about your PR and much thanks from him as well! 🎉

@Sander-Toonen

Copy link
Copy Markdown

Wow, this is very good news! It might need some documentation though.

Is it as straightforward as replacing gaufrette with flysystem? Does it support chunked uploading?

@lsv

lsv commented Jan 29, 2016

Copy link
Copy Markdown
Contributor Author

When I have a few moments i will write a proper documentation.

But for short, change gaufrette to flysystem in storage type.
And then setup flysystem bundle

  • Orpange is tested
  • Dropbox is tested (so maybe other external ones works - havent tested with others, please do if you have access to other external storages)
  • Local also tested :)
  • streamwrapper is not fully tested, but I will do this one of the following days, as I just started with a project based on flysystem (hence this PR ;-)

@lsv

lsv commented Jan 29, 2016

Copy link
Copy Markdown
Contributor Author

@bytehead well it actually took some time for me to find out that 1up-lab also have flysystem bundle, so I was a bit confused why you have chosen gaufrette :)

Anyways, it was actually pretty easy to create this, when I figured out that FileInterface missing a few methods, like move() and so on - I will properly make a PR for this.

And also a PR for documentation will come in a near future

@bytehead

Copy link
Copy Markdown
Member

@lsv I can totally understand your confusion 😄
The uploader bundle came out way before our flysystem bundle - that's probably why it ended up like this...

Sounds great - your PRs are always welcome!

@SrgSteak

SrgSteak commented Feb 6, 2016

Copy link
Copy Markdown
Contributor

I get a OutOfMemoryException on oneup/uploader-bundle/Oneup/UploaderBundle/Uploader/Storage/FlysystemStorage.php line 47 when uploading a larger file (~400MB). The chunked upload works, but the last step seems to cause the exception.

Any ideas?

UPDATE:
It seems the file_get_contents($file) is the cause. I replaced it with
$stream = fopen($file->getPathname(), 'r+');
$this->filesystem->putStream($name, $stream);
if (is_resource($stream)) {
fclose($stream);
}
and it works. Anyone interested in a PR?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants