diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2022-10-27 22:08:28 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2022-10-27 22:08:28 +0800 |
commit | 54b82e204ba9f25b24fa866808626c4700c5d4c9 (patch) | |
tree | 964dd9ea7b029848175418fc7498b5027b782336 | |
parent | d622972078762903a0698f07cfb7853174ddbd4a (diff) |
Update
-rw-r--r-- | alias | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -419,7 +419,7 @@ image.from_data_url() { | |||
419 | } | 419 | } |
420 | image.upload() { | 420 | image.upload() { |
421 | month=$(date +%Y-%m) | 421 | month=$(date +%Y-%m) |
422 | filename=$(date +"%d_%Hh%Mm%Ss").${1##*.} | 422 | filename=${2:-$(date +"%d_%Hh%Mm%Ss").${1##*.}} |
423 | scp $1 vps:~/data/s3.photos/$month/$filename | 423 | scp $1 vps:~/data/s3.photos/$month/$filename |
424 | echo https://topo.tw/photos/$month/$filename | 424 | echo https://topo.tw/photos/$month/$filename |
425 | } | 425 | } |