humanmade / S3-Uploads

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

Bug in \S3_Uploads_Stream_Wrapper::url_stat #190

Open pySilver opened 7 years ago

pySilver commented 7 years ago

This method \S3_Uploads_Stream_Wrapper::url_stat naively expects every file to have an extension. I believe it should let S3 decide whether it's a file or directory

etherealite commented 7 years ago

I would tend to agree. I think the concern about hitting the s3 endpoint every time wp_upload_dir() gets called on WP boots is overblown. After this function stats the upload dir it gets cached, so why bother circumventing the call to the S3 endpoint?

joehoyle commented 6 years ago

@etherealite that's a good point. This predates the caching in wp_upload_dir IIRC. I'll test side by side comparisons and remove it it's no longer needed.