silverstripe / silverstripe-s3

Silverstripe module to store assets in S3 rather than on the local filesystem (SS4/SS5 only)
BSD 3-Clause "New" or "Revised" License
20 stars 25 forks source link

File metadata cache is not updated on un/publishing #19

Closed filiplikavcan closed 5 years ago

filiplikavcan commented 6 years ago

After I upload an image it shows a thumbnail which has protected url. This is correct. When I publish the file, the actual file is moved (or rather the name on S3 is changed) but the public metadata cache is not updated. The result is that url is not updated to public and is still pointing to a non existing protected file. After I manually delete the metadata cache it correctly uses public url. The same problem exists the other way around when I unpublish the file and its url remains public.

I tested it on clean SS4 install.

filiplikavcan commented 6 years ago

It could be caused by this: https://github.com/thephpleague/flysystem-aws-s3-v3/pull/159

obj63mc commented 5 years ago

Just checking if there is any update on this. Essentially you can't use this module in the CMS as any time you try to upload images/publish them they show broken thumbnails.

obj63mc commented 5 years ago

This should be resolved now with the merge of #20. @filiplikavcan let us know if you see any issues.

madmatt commented 5 years ago

Closing this issue as we've released 0.4.0 for this - thanks for your efforts @filiplikavcan and @obj63mc, and sorry this took so long!

thats4shaw commented 5 years ago

@madmatt is there anyway we can give Packagist a kick so it picks up 0.4.0?

madmatt commented 5 years ago

Hey @thats4shaw, sorry I forgot to comment back on here. I kicked Packagist and it seems to have picked up 0.4.0 now: https://packagist.org/packages/silverstripe/s3