curl: no URL specified! #358

Closed
opened 2026-01-19 18:30:01 +00:00 by michael · 4 comments
Owner

Originally created by @seemsindie on GitHub.

So i just went to your website copied this:

# Add this to .bashrc or its equivalent 
transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi 
tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } 

I have save it in my .zshrc and when i run transfer test.txt i get this error:

Any idea why and how to fix it?

Originally created by @seemsindie on GitHub. So i just went to your website copied this: ``` sh # Add this to .bashrc or its equivalent transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } ``` I have save it in my .zshrc and when i run `transfer test.txt` i get this error: ![](http://i.imgur.com/7hJ864O.png) Any idea why and how to fix it?
Author
Owner

@kzaidi commented on GitHub:

This is old, shouldn't this be closed?

@kzaidi commented on GitHub: This is old, shouldn't this be closed?
Author
Owner

@nl5887 commented on GitHub:

Any updates on this?

@nl5887 commented on GitHub: Any updates on this?
Author
Owner

@huguesalary commented on GitHub:

Did you source your .zshrc after copying/pasting?

@huguesalary commented on GitHub: Did you `source` your `.zshrc` after copying/pasting?
Author
Owner

@paolafrancesca commented on GitHub:

@seemsindie is it still a problem?

@paolafrancesca commented on GitHub: @seemsindie is it still a problem?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#358