Browse Source

upload script: support reading from stdin

pull/6/merge
lilydjwg 5 years ago
parent
commit
7b3db05b60
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      templates/elimage

+ 4
- 1
templates/elimage View File

@@ -9,7 +9,10 @@ from subprocess import Popen, PIPE

args = []
for f in sys.argv[1:]:
args.extend(['-F', 'name=@'+f])
if f == '-':
args.extend(['-F', 'name=@-;-.png'])
else:
args.extend(['-F', 'name=@'+f])
cmd = ['curl', '--compressed', dest_url] + args
p = Popen(cmd, stdout=PIPE)
ret = p.wait()


Loading…
Cancel
Save