Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #5528 Allow to use stream as upload dir for FileUploadType (e…
…mmanuel-tilleuls) This PR was merged into the 4.x branch. Discussion ---------- Allow to use stream as upload dir for FileUploadType As mention in #5136 and #5464, EasyAdmin is tight linked to local filesystem. This is an issue when one wants to use a s3 bucket to store images uploaded through `FileUploadType`. Instead of override `upload_new` and `upload_delete` closure to move the file to the bucket (tip from SymfonyCast), you can use the stream wrapper of s3 client : - call `registerStreamWrapper` after instantiate S3 client - set `ImageField` `uploadDir to `s3://bucket-name/` - no need to set `upload_new` nor `upload_delete` type options But doing this isn't enough because EasyAdmin check uploadDir existence prepended with project directory (in order to have an absolute directory name). I propose with this PR to not prepend project directory when the uploadDir is an url. Commits ------- ddbced9 Allow to use stream as upload dir for FileUploadType
- Loading branch information