humanmade / S3-Uploads

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

Look into supporting WP_Filesystem #151

Open joehoyle opened 7 years ago

joehoyle commented 7 years ago

Some plugins use the WP_Filesystem API to write to the uploads folder (for unknown reasons) for example: https://github.com/siteorigin/so-widgets-bundle/blob/1.6.5/base/siteorigin-widget.class.php#L628

If easy, it would be good to support this for the s3:// url scheme.

sc0ttius commented 6 years ago

I think I've run into this issue with Formidable and Visual Composer. The file seems to upload properly to s3, but when building the URL using $wp_filesystem and uploads['basedir'], it uses s3.amazonaws.com/[bucket_name]/ rather than the defined S3_UPLOADS_BUCKET_URL. Is that what you intend to fix with this issue?