Created
July 5, 2013 04:17
-
-
Save wokamoto/5931567 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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