From f7be5d413416d558357ba2d2310f2e08800da9ac Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 24 Oct 2010 10:41:15 +0200 Subject: fix uploading of dynamic files curl is unable to determine the size of dynamic files like /proc/cpuinfo because they are only stored in memory and dynamically generated when read. Signed-off-by: Florian Pritz --- fb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fb b/fb index 41523fc..30c02f7 100755 --- a/fb +++ b/fb @@ -11,7 +11,7 @@ # Optional: xclip #---------------------------------------------------- -VERSION="0.6.8.1" +VERSION="0.6.8.2" DELETE= EXTENSION="" @@ -58,7 +58,7 @@ do_upload() { return 1 fi fi - if ! curl -# -n -L -A $USERAGENT $EXTRA -F "file=@$file" "$PASTEBIN/file/do_upload" > $TMPFILE; then + if ! cat "$file" | curl -# -n -L -A $USERAGENT $EXTRA -F "file=@-;filename=$basefilename" "$PASTEBIN/file/do_upload" > $TMPFILE; then EXITCODE=1 return 1 fi -- cgit v1.2.3-24-g4f1b