curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Request: flag for delayed start of HTTP until STDIN sends EOF

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 10 Oct 2017 00:49:22 +0200 (CEST)

On Mon, 9 Oct 2017, Rudy via curl-library wrote:

> Goal:
> slow_script.pl | curl "-FmyUpload=@-;filename=foo.txt"
> --wait-for-eof-for-upload https://user:pass@haxx.se/upload.php

...or just write a simple little script to do it:

#!/bin/sh
TMP=$(mktemp)
slow_script.pl > $TMP
curl "-FmyUpload=@$TMP;filename=foo.txt" https://user:pass@haxx.se/upload.php
rm $TMP

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-10-10