Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
add_action('StaticPress::file_put', 'static_press_upload', 10, 2);
function static_press_upload($file_dest, $url){
$s3_bucket = 'bucket_name';
$s3_key = preg_replace('#^(https?://[^/]+/|/)#i', '', urldecode($url));
$result = my_s3_upload_function($file_dest, $s3_bucket, $s3_key);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.