From fc2fd5dc20cdc324f17a133c171b03f1ee4fd48e Mon Sep 17 00:00:00 2001 From: straup Date: Mon, 24 Jun 2013 14:31:49 +0200 Subject: [PATCH] s3_delete; stub out backfill tool --- bin/backfill_s3_paths.php | 8 ++++++++ www/include/lib_storage_s3_new.php | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 bin/backfill_s3_paths.php diff --git a/bin/backfill_s3_paths.php b/bin/backfill_s3_paths.php new file mode 100644 index 0000000..a0384bb --- /dev/null +++ b/bin/backfill_s3_paths.php @@ -0,0 +1,8 @@ + diff --git a/www/include/lib_storage_s3_new.php b/www/include/lib_storage_s3_new.php index 256d097..0a33ccb 100644 --- a/www/include/lib_storage_s3_new.php +++ b/www/include/lib_storage_s3_new.php @@ -3,7 +3,7 @@ $GLOBALS['_storage_hooks']['file_exists'] = 'storage_s3_file_exists'; $GLOBALS['_storage_hooks']['get_file'] = 'storage_s3_get_file'; $GLOBALS['_storage_hooks']['put_file'] = 'storage_s3_put_file'; - $GLOBALS['_storage_hooks']['delete_file'] = ''; + $GLOBALS['_storage_hooks']['delete_file'] = 'storage_s3_delete_file'; loadlib('s3'); @@ -70,7 +70,11 @@ function storage_s3_put_file($path, $bytes, $more=array()) { ######################################################################## function storage_s3_delete_file($path, $more=array()){ - # TO DO: grab code from mirror project (20130529/straup) + + $bucket = storage_s3_bucket(); + + $rsp = s3_delete($bucket, $path); + return $rsp; } ########################################################################