curl / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Rudy via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 9 Oct 2017 16:07:18 -0700

My goal was a one line solution for cronjobs. The 'sleep 60' hack seems
to work. Not sure if anyone else has a use for a
"--wait-for-eof-on-upload" flag.

Thanks,
Rudy

On 10/09/2017 03:49 PM, Daniel Stenberg wrote:
> 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
>

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