From eebc711ed440ef48c07657f120db0da3d2d29672 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sun, 21 Dec 2014 15:43:11 -0800 Subject: [PATCH] enable uploading in upload-to-s3 --- upload-to-s3 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/upload-to-s3 b/upload-to-s3 index d5857be..03f1d4d 100755 --- a/upload-to-s3 +++ b/upload-to-s3 @@ -6,8 +6,6 @@ function filesize() { stat "$1" | cut -d' ' -f8 } -touch ~/wtf - big_size=$((512 * 1024)) max_size=$((2 * 1024 * 1024)) @@ -31,6 +29,6 @@ if [[ $(filesize "$img_path") -gt $big_size ]]; then fi fi filename=$(basename "$img_path") -# s3cmd put "$img_path" s3://static.samhuri.net/"$filename" +s3cmd put "$img_path" s3://static.samhuri.net/"$filename" ruby -rerb -e "puts 'http://static.samhuri.net/' + ERB::Util.url_encode('$filename')" ruby -rerb -e "print 'http://static.samhuri.net/' + ERB::Util.url_encode('$filename')" | pbcopy