Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ability to use flysystem to manage uploaded files #5555

Open
wants to merge 4 commits into
base: 4.x
Choose a base branch
from

Conversation

emmanuel-averty
Copy link
Contributor

When using ImageField, the downloaded image goes to local file system. With this PR, easy admin user can configure a FilesystemOperator in order to abstract file system and therefor choose where to put the images. It can bee anything supported by Flysystem such as S3 bucket or FTP directory.

The FilesystemOperator instance has to be configured with the Flysystem Symfony bundle

Closes #5544

javiereguiluz added a commit that referenced this pull request Jan 9, 2023
…uel-tilleuls)

This PR was merged into the 4.x branch.

Discussion
----------

replace annotations by attributes in test entities

The tests jobs of my previous PR (#5555) failed with errors :
```
The service "doctrine.orm.default_annotation_metadata_driver" has a dependency on a non-existent service doctrine.orm.metadata.annotation_reader".
```
This PR replaces annotations by PHP 8 attributes.

This change allows tests to pass for PR #5555

(The actual code change in entities has been made by rector)

Commits
-------

f544918 replace annotations by attributes in test entities
@emmanuel-averty emmanuel-averty force-pushed the flysystem-image-upload-type branch from 139e66f to ea383f4 Compare January 10, 2023 13:59
@apsylone
Copy link

apsylone commented Mar 7, 2023

Anything is blocking this PR ?

@emmanuel-averty emmanuel-averty force-pushed the flysystem-image-upload-type branch from ea383f4 to 877bec7 Compare October 2, 2023 07:43
@mahono
Copy link

mahono commented Oct 25, 2023

I think it would be better to introduce an interface along with a simple default implementation to also allow different drivers/adapters. Then maybe it would even be enough to provide some documentation about how to provide your own implementation.

@emmanuel-averty
Copy link
Contributor Author

Thank you @mahono for this advise. You're very right.
I'll try to modify this PR to provide the implementation you suggest.

@pdragun
Copy link

pdragun commented Jul 28, 2024

Hi @emmanuel-tilleuls. Please are going to modify PR in the future, or it is OK for you if I take care of it? Thanks a lot.

@emmanuel-averty
Copy link
Contributor Author

Hi @pdragun. I don't have much time to take care about this PR these days. Feel free to reuse the code.

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.

Flysystem as optional filesystem operator for ImageField
4 participants