Skip to content

Instantly share code, notes, and snippets.

@msonnabaum
Created December 16, 2009 22:25
Show Gist options
  • Save msonnabaum/258246 to your computer and use it in GitHub Desktop.
Save msonnabaum/258246 to your computer and use it in GitHub Desktop.
<?php
// Create the return filepath. We add the bucket file path if
// the a custom domain is not being used
preg_match('@^(?:https?://)?([^/]+)@i', $settings['mm_s3_server_url'], $domain);
if ( $domain[1] == 's3.amazonaws.com') {
$s3_filename = $bucket . '/' . $s3_filename;
}
return $settings['mm_s3_server_url'] . $s3_filename;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment