humanmade / S3-Uploads

The WordPress Plugin to Store Uploads on Amazon S3
1.94k stars 389 forks source link

ListObjects requests issued on files #616

Open adicco opened 1 year ago

adicco commented 1 year ago

Hello, many thanks for this plugin which has been working well for us so far. I had to pay attention to one plugin in particular which was issuing tens of thousands of LIST requests, thereby increasing our S3 bill. While investigating requests using CloudTrail, I found a significant number of ListObjects requests on paths which contain an extension.

For instance wp-content/uploads/2022/11/15/Speakers-Statements-ALL-FINAL-pdf-247x350.jpg/

Is this something: that WordPress does in its inner workings (issues a 'read' comment on a path to see if it's a directory?) or is this related to this plugin, or potentially to another plugin? The idea being to avoid issuing these LIST calls on what are effectively files, not folders.

Thank you very much.