enable uploading in upload-to-s3
This commit is contained in:
parent
4ae843a820
commit
eebc711ed4
1 changed files with 1 additions and 3 deletions
|
|
@ -6,8 +6,6 @@ function filesize() {
|
||||||
stat "$1" | cut -d' ' -f8
|
stat "$1" | cut -d' ' -f8
|
||||||
}
|
}
|
||||||
|
|
||||||
touch ~/wtf
|
|
||||||
|
|
||||||
big_size=$((512 * 1024))
|
big_size=$((512 * 1024))
|
||||||
max_size=$((2 * 1024 * 1024))
|
max_size=$((2 * 1024 * 1024))
|
||||||
|
|
||||||
|
|
@ -31,6 +29,6 @@ if [[ $(filesize "$img_path") -gt $big_size ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
filename=$(basename "$img_path")
|
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 "puts 'http://static.samhuri.net/' + ERB::Util.url_encode('$filename')"
|
||||||
ruby -rerb -e "print 'http://static.samhuri.net/' + ERB::Util.url_encode('$filename')" | pbcopy
|
ruby -rerb -e "print 'http://static.samhuri.net/' + ERB::Util.url_encode('$filename')" | pbcopy
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue