-
Notifications
You must be signed in to change notification settings - Fork 519
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
make gaufrette's metadata work #556
Conversation
make gaufrette's metadata work by creating Gaufrette\File and set metadata there
@rssfeed can you tell something more about this PR? |
It's been a long time, but as I remember, without this changes, files stored via gaufrette in amazon s3 won't get the correct metadata. E.g. a jpg got mime-type (as far as I remember) "application/octet-stream" instead of "image/jpeg". Without having the correct mime-type the browser won't behave as expected. With my pull request changes in place the metadata is being added correctly. |
@rssfeed can you add test that confirm fix and prevent regression in future? |
What is preventing this PR from being merged? |
|
This does not fix #163, as when setting metadata in Gaufrette File, Gaufrette first tries to save metadata, and then the file itself. See KnpLabs/Gaufrette#537 Upon closer inspection I don't know if this PR actually changes anything, as
Underneath calls the same If KnpLabs/Gaufrette#537 is fixed, then
Could be done no matter if adapter supports metadata or not, and I guess that would be the best solution. It should be up to Gaufrette to save metadata along with file in most atomic way. |
So, what we can do here is waiting for Gaufrette feedback, then close this PR (that looks too old) and open a new one. |
Without Gaufrette feedback, Uploader can save file first, then metadata at risk of file being saved without metadata. Or retry saving metadata after file upload, if it failed before. Those are options to consider, if Gaufrette is not fixed. I looked into fixing Gaufrette myself, but after seeing code I put it off - there is no way to do it there without risking some (internal) BC changes. I will see how KnpLabs/Gaufrette#537 goes. |
Closing because it's too old and without any feedback |
make gaufrette's metadata work by creating Gaufrette\File and set metadata there