Skip to content

Commit

Permalink
removed unneeded function
Browse files Browse the repository at this point in the history
  • Loading branch information
justinhunt committed Jun 14, 2020
1 parent 4ac471e commit 1d5ca23
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions classes/awstools.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,34 +467,7 @@ function fetch_s3client() {
return $this->s3client;
}


function get_presigned_upload_url($contenttype, $days = 7, $key, $iosvideo = false) {
$s3client = $this->fetch_s3client();
//Get bucket
$bucket = 'poodll-audioprocessing-out-us-east-1';
$key = 'CP/365/olaf/' . $key;

//options
$options = array();
$options['Bucket'] = $bucket;
$options['Key'] = $key;
$options['Body'] = '';
$options['ContentType'] = 'application/octet-stream';

$cmd = $s3client->getCommand('PutObject', $options);

//this can fail with SDK loading issues we return an error message in that case
try {
$request = $s3client->createPresignedRequest($cmd, '+' . $days . ' days');
$theurl = (string) $request->getUri();
} catch (\Exception $e) {
print_error($e->getMessage());
$theurl = $e->getMessage();
}
return $theurl;
}

function xget_presigned_upload_url($mediatype, $minutes = 30, $key, $iosvideo = false) {
function get_presigned_upload_url($mediatype, $minutes = 30, $key, $iosvideo = false) {
$s3client = $this->fetch_s3client();
//Get bucket
$bucket = '';
Expand Down

0 comments on commit 1d5ca23

Please sign in to comment.